Updating my app to RC - My story


#1

Edit:
Hi, after a little bit of dropping this out I found this post that was talking exactly about this, and I’ll share to people like me to know “You are not alone” and this a known issue you cand read Mike from Ionic team explanation about this.

Why ionic serve got so slow after RC0?

Original post:

Hi, how are you all doing?

I wanted to share my experience with the migration. In a broad way I have been following up with beta releases since beta8 aprox. I updated my app subsequently, with almost no effort thanks to the great changelogs and instructions.
I started developing with Ionic2 in beta because the overall development was blazing fast and amazingly stable.

And thats a great part into reason of using it, a couple of hacks here and there and i got everything working. What I miss more about the beta is Gulp during development. For exactly the same project same computer same views and everything, gulp took at max 6 seconds to build deploy the changes to the browser. While rollup is taking aprox 45 seconds, when a HTML gets changed it bundles ALL again and makes no distinction. With the beta I used to change a CSS only the sass was recompiled and refreshed in the browser. Thing that no longer happens with default rollup process.

[20:45:30] sass started …
[20:45:30] sass finished in 35 ms
[20:45:30] templateUpdate finished in 44.38 s
[20:46:25] templateUpdate started …
[20:46:25] bundle dev update started …
JS changed: C:\Users\devarg\Documents\dev\Project\app\www\build\main.js
[20:47:16] bundle dev update finished in 51.33 s
[20:47:16] sass started …
[20:47:16] sass finished in 39 ms
[20:47:16] templateUpdate finished in 51.37 s

I think that this must be in favor of new features like tree shaking, that must take time to analyze each and every library that connects to the module and do the shaking there too. But, (if the tree shaking algorithm is secure) do we need tree shaking while developing? Much of developing with Ionic is deeply caring about UI and UX, whose process must be blazing fast to not become a bottleneck in tuning, fixing and developing with it.

Please correct me if i’m wrong, i’d also like to hear your thoughts on the migration if you are in a similar situation to me.

Thanks!!!


#2

Wow that’s a lot of time, for me i was using Webpack, now i’m forced to Rollup (the transition is a mess) and i haven’t yet started passing the core of the app and the rebuild already take 15s, how much will it increase when i pass all the code?

Most likely when i finally finish passing the app to Rollup the time would be also around 40 ~ 60 sec.


#3

I think that’s the point: tree shaking is not needed while developing


#4

Hi, looks like we are all in the same boat!

I think that will depend on the amount of libraries you are including and their dependencies. Another factor to take in consideration is that angular’s new NgModule aproach is begging you to split your app into smaller consistent pieces of functionalities. So I would guess that if we are building super-duper gigantic modules we must be doing it wrong.


#5

How long did your app take between refreshes with Webpack? We are working on speeding up the build right now.

Thanks,
Dan


#6

With webpack the build did take 1 ~ 1.2 min, but the rebuild process would take max 5 sec in my pc with SSD and max 10 in my non SSD pc.


#7

Tree shaking isn’t the issue. Our prod builds are slow because ngc is slow. We’re working on optimizing the dev builds to be faster while still being accurate.


#8

Good to know. Thanks. Our development build will likely be a little slower, but hopefully not too much.

Thanks,
Dan


#9

Let me doubt about that, the current empty project takes 6.66 sec rebuild time in the best of cases, while my “BIG” project (can 143 files be counted as big?) with 143 files (at least the specific ones to the project, can’t count the pollyfils and vendor libs ones) takes roughly the same time with Webpack.

I would dare to say that if i finish transitioning the whole project to Rollup the time would be 10x slower than the equivalent project with webpack.