Alin Tomescu
Alin Tomescu

Reputation: 393

Meteor app takes too long to recompile

Are there any flags that can be passed to the meteor tool to speed up recompilation? When I make edits to code inside client/ they get processed almost instantly, while edits in lib/ or server/ take tens of seconds to get processed.

I'm guessing it's because the node.js server code is rebuilt and the server is restarted?

Recompilation also (naturally) slows down with increasing code size.

This really slows down development: the edit -> run -> debug -> edit cycle takes too long due to slow recompilation.

Are there any magic fixes for this by any chance?

Edit: One magic fix seems to be a meteor reset, which seems to speed up drastically the rebuild time when meteor is relaunched.

Upvotes: 2

Views: 1664

Answers (2)

Aaron
Aaron

Reputation: 141

You will find that editing files in the client folders etc. will update straight away as Meteor knows that you are making client side changes.

Server changes require a complete recompile of the source so it takes longer to run, it also does some re-computation in the packages installed and makes sure there aren't any new or outdated ones, updating if required.

Additionally it monitors the .meteor/packages file to see if you have added or removed any packages from there and makes the changes without having to restart the server from the command line.

There was talk of hopefully some speed improvements soon in relation to the solving of package versions but at the moment, while it is clever at packaging versions, it is a bit slow at re-compile time.

Upvotes: 2

Mário
Mário

Reputation: 1612

Not really, you'll have to live with it. I have performance issues on reloading and it only gets worst when you application grows.

When you change your code, Meteor simply repacks the whole application. I would to get this fixed, It's very easy to get distracted every you make a change.

Simple solution that you'll hate: I recently bought a better computer and It fells fast but you'll still notice this. On Meteor 0.8.3 this was so frustrating that I wasn't being productive as usual, On Meteor 0.9/1.0 on the new computer It takes adds around 3 to 8 seconds, according to my personal experience.

Upvotes: 0

Related Questions