Recommendations for Avoiding "Unnecessary" Rebuilds


#1

The build tool really should not build unnecessarily. Every bundle of source code should have some hash (computed recursively based on subfolder contents and other things. Such a hash could be computed quickly each time things might have to be built and compared with the existing “last built hash” (if any), allowing developers to avoid unnecessary rebuilds.

It’s really silly to build… Hit CTRL-C… run again and have to go through an unnecessarily build song and dance.

In fact, there should be --rebuild flags or --run-last-build flags where the former does the natural thing, and the latter just tries to run the most recent build without looking at the current source code.


#2

Meteor rebuilds automatically when you keep it running. Though I kind of wish there was a way to trigger it explicitly or pause it. The rebuilds are faster as long as you keep the server running or until you run out of memory for the server.


#3

If you’re on linux or OSX, you can run meteor in foreground (the standard meteor command) and then use CTL-Z to stop (pause) it, while you edit a bunch of files, then fg to put it back into foreground and let it rebuild all the changes in one go.


#4

There’s also this handy piece of code:

Meteor._reload.onMigrate(function() {
  return [false];
});

From: http://stackoverflow.com/a/27683376/2509364

Then you can just F5 when you want new changes (once bundle has rebuilt)


Though I think @convexset was referring to the longer build process that the tool has to go through every time you run meteor.

Not sure why the last build isn’t re-used.


#5

Unfortunately not all of us are priviledged

me <- on Windows


#6

me <- on Windows too.

However, although I do some Meteor development on Windows, I also have a VirtualBox VM running Ubuntu - so I develop on that as well.