Linus
Linus

Reputation: 948

Meteor File Change Watcher is taking too long to recognize changes

My Meteor file change watcher is taking forever to detect my file changes and refresh the browser, sometimes even longer than a minute. This makes developing a real pain.

My Meteor is running inside an Ubuntu-VM. The projects folder lies in my OSX and is mounted inside the VM. So I'm aware that inotify/kqueue won't work, so Meteor should fallback to stat polling.

I even set the environment variables according to this post, but the behavior is still the same.

METEOR_WATCH_FORCE_POLLING=true
METEOR_WATCH_POLLING_INTERVAL_MS=500

Is there any way to fix this annoying behavior?

The folder from OSX is mounted as a nfs share btw.

Update:

I did some testing and there is no difference if the application has a big amount of packages or is taking long to build, even with the very basic app you get after meteor create I still get the same behavior.

If I change a file in the VM (so that inotify works) the refresh is happening instantly.

Upvotes: 3

Views: 619

Answers (2)

Mário
Mário

Reputation: 1612

I've have apps in production that incrementally become slower when adding packages, both 3rd party and private packages. I also discovered that adding 3rd libs directly on the client/lib increases the reloading time.

I'm not sure if Meteor 1.0.2 actually solved the problem of watching the directory efficiently.

Upvotes: 1

Tomas Romero
Tomas Romero

Reputation: 8718

What version of Meteor are you using?

Much of this lag-reloading issue was addressed on Meteor 1.0.2. While it still takes some time, I would say was ~5x faster on my experience.

Upvotes: 0

Related Questions