Why my Ionic CLI commands are a lot slower than Cordova?
Asked Answered
H

2

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?

Hepler answered 7/9, 2016 at 12:35 Comment(7)
Maybe looking at the source code helps to answer this question...Miniskirt
Do you mean something specific? I've already opened an issue there to get attentionHepler
@DevidFarinelli Did you checked this link - github.com/driftyco/ionic-cli/issues/497 by any chance? disabling live reload seems to fix the slowness issueGunnar
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.986sHepler
@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 opinionGunnar
Hi Ghandi, what do you mean for "proven framework"?Hepler
Also, testing on another Mac cordova takes 0m0.397s and ionic takes 0m0.403s for plugin listHepler
T
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

Tsaritsyn answered 30/10, 2016 at 11:29 Comment(0)
G
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.

Gentlefolk answered 21/9, 2016 at 14:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.