Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excludes aren't 100% excluded #47

Closed
laggingreflex opened this issue Oct 7, 2016 · 5 comments
Closed

Excludes aren't 100% excluded #47

laggingreflex opened this issue Oct 7, 2016 · 5 comments

Comments

@laggingreflex
Copy link
Contributor

It seems ignored paths aren't 100% ignored. Like if I change something in the .git directory, surely it doesn't actually get uploaded but it still triggers a file change event, meaning it's still being monitored which is unnecessary. Having a huge node_modules or otherwise ignored folders cause it to take up considerable time to start up.

This can be tested by putting a console log here: src\local\fs-helper.js and changing any file in one of the ignored folders, .git/info/excludes

@laggingreflex
Copy link
Contributor Author

laggingreflex commented Oct 7, 2016

It seems the cause of this is the format of exclude patterns. .git/**, and .git/**/* don't work, but what worked for me was **/.git. It has something to do with how chokidar/anymatch parses and matches these ignore patterns...

I should note that it only adversely affects the startup performance, not the general/core functioning. Since I see that internally this is not just relying on above modules and actually reevaluating ignored paths (like in onFileChange above). Rsync too works great with these patterns. It's only the filewatcher that's causing performance issues.

@laggingreflex
Copy link
Contributor Author

I really would've liked if simply .git, or node_modules had worked as they do with git in .gitignore

Would it be desirable to augment this kind of ignore pattern parsing further? I know it already works as far as the core functionality of the project is concerned but it really shoots up the startup time for large ignored folders...

@laggingreflex
Copy link
Contributor Author

laggingreflex commented Oct 8, 2016

I've made a PR to chokidar that basically prefixes **/.git to paths which can solve this. Wrong approach. Better fix was to just add cwd option

@joelgriffith
Copy link
Contributor

@laggingreflex I think your PR satisfies this issue...

@joelgriffith
Copy link
Contributor

Released in 3.0.0, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants