-
Notifications
You must be signed in to change notification settings - Fork 21
Slow startup time when minify is enabled #23
Comments
Yes it is sync calls on startup in production because otherwise there is a risk that users receive assets that aren't really fully compiled yet. But yeah, 20 seconds sounds a bit too long for sure. How many css and js files do you have? Turning off minifyJS will for sure speed things up though. |
there is very little of css & js to minify... you can see on www.marcellop.com.. for now it runs only with bundle enabled but minify disabled... |
Hm, yeah. Not much to do about it though. Right now we are using it for a site with like 15+ .coffee files and equally amount of .stylus files and it does maybe take 4-5 seconds in startup. We are only using the |
I've set all my app templates to 'minifyJs = false' in production. ~Your time, thoughts and efforts are greatly appreciated; I really like this module :) |
For me, it's fine it takes a bit of time on the first startup, the problem is that bundle up runs the compilation even when the files haven't changed since last time. So if there was an uncaught error and the process dies and restarts, it would take forever to restart. What if instead of using a hash suffix to append to the generated bundled up files, we use a timestamp. Then on every node process restart we can check if the files have been modified since last compilation before we try to compile everything again. I think that would solve our problems. |
Yeah, that's a great idea. |
I will make a change for this! What I will do is that I will only generate the files on first startup when This have been a pain-point for us as well (we're also using bundle-up in production) since it simply isn't viable to have these long start up times. This might give unexpected results for you in production, depending on how you are managing your npm modules. I will release a new version ( |
Awesome, thanks for responding. Look forward to the update :) |
I hosted my app that use bundle-Up on nodejitsu, mut if I enable the minifyCss & minifyJs options, the app start take over 20 seconds to start, and the hosting provider than reject my app.
Looking at the code, I see that in bundle.coffee you use a lot of SYNC file operations, maybe that is the cause to the slowness...
or maybe is another...
The text was updated successfully, but these errors were encountered: