meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

Allow server to continue running during rebuilds #303

Open dobesv opened 6 years ago

dobesv commented 6 years ago

It would be great if the server would continue running while rebuilding.

Currently if I make a change, the server stops, so I can't do much testing or messing around in the app until it finishes rebuilding and restarting the server.

dr-dimitru commented 6 years ago

Hello @dobesv are we talking about production here?

dobesv commented 6 years ago

No, development.

dr-dimitru commented 6 years ago

@dobesv how long does it take to rebuild an app?

dobesv commented 6 years ago

It typically takes between 30 and 300 seconds, depending on the machine and other factors that are invisible to me. I recently upgraded my machine so I get 30 seconds rebuilds most of the time. Others on my team are using MacBooks so I think they are looking at 60 seconds on average for a rebuild.

dr-dimitru commented 6 years ago

@dobesv this is a lot!

  1. What stack are you on? (Blaze, React, Vue, other)
  2. Could you post your package.json file?

There is a way to speed up building time by installing some NPM packages. Make sure you have globally and locally installed node-gyp and node-pre-gyp.

dobesv commented 6 years ago

Hi, there's already some discussion about it in a meteor issue, I think it's a bit separate from this feature request. Sounds like something to do with there being a lot of files in node_modules.

https://github.com/meteor/meteor/issues/9969

How long does it take for meteor to rebuild on your project(s) ?

On Thu, Jun 21, 2018 at 10:09 AM dr.dimitru notifications@github.com wrote:

@dobesv https://github.com/dobesv this is a lot!

  1. What stack are you on? (Blaze, React, Vue, other)
  2. Could you post your package.json file?

There is a way to speed up building time by installing some NPM packages. Make sure you have globally and locally installed node-gyp and node-pre-gyp.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/meteor/meteor-feature-requests/issues/303#issuecomment-399176575, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUAmVWXvvCQmsGe5GtMLT5h0iUEXMM1ks5t-9M1gaJpZM4UhF-n .

dr-dimitru commented 6 years ago

@dobesv biggest projects is ~10 sec and I'm on old 2012 MBP with SSD, but even SSD is old and not that fast as new macs at all. Small average size almost instant for Client and 1-3 sec for Server rebuild. Including projects where we use TS, Sass, Jade, CoffeeScript - build time usually a bit longer but, still not that long.

dobesv commented 6 years ago

Yeah, I don't think it's the number of technologies you use. We must be importing some packages that have a lot of dependencies. Like Apollo, DraftJS, etc.. I don't know exactly which one is the issue.

On Thu, Jun 21, 2018 at 11:55 AM dr.dimitru notifications@github.com wrote:

@dobesv https://github.com/dobesv biggest projects is ~10 sec and I'm on old 2012 MBP with SSD, but even SSD is old and not that fast as new macs at all. Small average size almost instant for Client and 1-3 sec for Server rebuild. Including projects where we use TS, Sass, Jade, CoffeeScript - build time usually a bit longer but, still not that long.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/meteor/meteor-feature-requests/issues/303#issuecomment-399207714, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUAmTLAr9GYhDiDQHd03DzFN220vX2-ks5t--wggaJpZM4UhF-n .

dr-dimitru commented 6 years ago

@dobesv it is only true if you're importing NPM packages as source code for further compilation by Meteor (e.g. Babel ES6 -> ES5). Otherwise all NPM packages hanging in node_modules and maybe some of them at bundler-cache.

dobesv commented 6 years ago

@dr-dimitru are there different ways of importing npm modules in meteor? I haven't heard of that before.

dr-dimitru commented 6 years ago

@dobesv sorry for late reply, yes, many ways:

Although Meteor does not recompile packages installed in node_modules by default, compilation of specific npm packages (for example, to support older browsers that the package author neglected) can now be enabled in one of two ways: