CLI performance

I decided to run a benchmark between ionic 2 beta 11 (gulp build) and ionic 2 rc1 (rollup build) to illustrate the difference between the build times.

I’m running these benchmarks in a MacBook Pro (2.4 Ghz i5 - 16GB RAM - 480GB SSD).
I used iTerm and broadcasted the inputs to all panes in the tab to make sure the builds started at the exact same time.
The pane in the left is running ionic 2 rc1 and the pane in the right is running ionic 2 beta 11 (I used the same base project).

#ionic serve

  • RC1 ~ 31s
  • beta 11 ~ 19s

Saas change - Refresh

  • RC1 ~ 3s
  • beta 11 ~ 3.3s

HTML change - Refresh

  • RC1 ~ 479ms
  • beta 11 ~ 41ms

TS change - Refresh

  • RC1 ~ 15s
  • beta 11 ~ 1.3s
3 Likes

Yeah, saw that too. One big issue I guess is that they create only one final bundle which contains all vendors. I don’t see the point of rebundling all vendors all the time in watch mode. When I was using Ionic 1 with a custom grunt build, I would watch vendors and sources separately which would then trigger either the vendors or sources bundle. This is a very simple optimisation but it changes everything.

There is also a lot of stability issues notably with sourcemaps and some omissions like the livereload mode which is not so well supported.

Hope they will do something about that. I’m waiting for some kind of optimisation since they introduced rollup.

I would also love to hear about their vision regarding their new build. They let us expect a default customisable webpack build in beta.11 and they gave us a hidden custom node build (node_modules) not so customisable in rc.0. That’s a big big change. And now on github we can see they work also on some alternative with webpack. Don’t really understand where they are and where they go right now.

1 Like