solidusjs / solidus

A simple server that generates pages from JSON and Templates
MIT License
28 stars 7 forks source link

Performance tweak: don't watch /deploy and /node_modules. #85

Closed joanniclaborde closed 10 years ago

joanniclaborde commented 10 years ago

Running a Solidus site inside a Vagrant virtual machine, hosted on a Windows machine is pretty slow (https://github.com/solidusjs/solidus-devbox/issues/6). The problem is with the slow folders sharing between the machines.

This pull request removes unnecessary files from Solidus' watch list, which seems to fix the problem (node_modules contains a lot of files, there's no need to watch those).

Fauntleroy commented 10 years ago

I'm thinking of retooling the watchers so we just explicitly watch the 4 things we need to keep an eye on. This should do fine for now, however.

joanniclaborde commented 10 years ago

I tried that approach, but it doesn't work for files yet to be created. If auth.json is missing, for example, we'll never get a notification when it gets added.

Fauntleroy commented 10 years ago

Right, I think that was the problem with chokidar before, and why we're using it like this. I'll have to see if the node.js filesystem watching module ecosystem has changed in the past 8 months sometime.

Fauntleroy commented 10 years ago

Looks like https://github.com/shama/gaze has improved recently. I'll have to look into using that and simplifying everything.

joanniclaborde commented 10 years ago

Send me the branch if you do, I'll test it on Windows.