11

I'm using ionic 2.0.0-beta.37, cordova 6.2.0 and node 6.2.0 on OSX 10.11.4

cordova platform list | time ionic platform list

real  0m19.449s       |    real   1m16.809s
user  0m0.890s        |    user   0m2.711s
sys   0m0.166s        |    sys    0m0.685s

cordova plugin list | ionic plugin list

real  0m0.587s        |    real   0m41.768s
user  0m0.503s        |    user   0m2.362s
sys   0m0.055s        |    sys    0m0.891s

Why Ionic CLI is so much slower?

Devid Farinelli
  • 7,514
  • 9
  • 42
  • 73
  • Maybe looking at the [source code](https://github.com/driftyco/ionic-cli) helps to answer this question... – Phonolog Sep 07 '16 at 16:10
  • Do you mean something specific? I've already opened an [issue](https://github.com/driftyco/ionic-cli/issues/1348) there to get attention – Devid Farinelli Sep 07 '16 at 16:20
  • @DevidFarinelli Did you checked this link - https://github.com/driftyco/ionic-cli/issues/497 by any chance? disabling live reload seems to fix the slowness issue – Gandhi Sep 12 '16 at 13:58
  • Hi @Ghandi thanks for your reply, that seems to be about `ionic serve`. Anyway I've tried shutting down my server before executing the commands. I'm not certain about the result, the time needed for each command is decreased but it is still slower than cordova. `cordova plugin list => 0m0.594s` - `ionic plugin list => 0m18.986s` – Devid Farinelli Sep 13 '16 at 07:15
  • @DevidFarinelli Any wrapper build around the core framework (in this case cordova) will obviously be slow due to additional overheads. Moreover as far as i know, ionic is not a proven framework. Its widely used jus cos of the ease of coding. That's my personal opinion – Gandhi Sep 16 '16 at 05:05
  • Hi Ghandi, what do you mean for "proven framework"? – Devid Farinelli Sep 18 '16 at 08:26
  • Also, testing on another Mac cordova takes `0m0.397s` and ionic takes `0m0.403s` for `plugin list` – Devid Farinelli Sep 19 '16 at 16:12

2 Answers2

3

I was also facing speed issue when i do ionic serve, tried disabling live reload, not much helpful.

I found this answer on ionic forum, I do notice some speed improvement while doing ionic serve

Try doing npm rebuild node-sass

Anjum....
  • 4,086
  • 1
  • 35
  • 45
0

I am by no means a shell expert but of course, they will always be slower. The Ionic CLI is using the Cordova commands behind the scene. This is why when you want to build you will need Cordova installed to have the CLI commands like BUILD to work.

Also Ionic uses this opportunity to build your latest source code first well in V2 at least with the build tools like Gulp and then goes on to do the normal Cordova stuff. So yes it should always be slower but shouldn't be a concern at all.

Sani Yusuf
  • 982
  • 1
  • 10
  • 20