-
Notifications
You must be signed in to change notification settings - Fork 273
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
fix(watcher): use exclude options to optimize file watching #1320
Conversation
@matuszeman could you try this and see if it solves your issue? |
It's a little confusing that |
I did put in clauses in the docs mentioning that these specific fields can be used to limit file watching, but didn't explain why the include filters aren't helpful. The reason is that only rarely/incidentally can I'm not sure where/how to explain this though. What do you think? |
Yeah I agree with the implementation. I suggested mentioning this in the reference docs for the I figured users would expect |
Sure, makes sense! I'll add notes in the relevant schema field descriptions. |
This basically relies on optimizations already implemented in chokidar, the library we use for file watching. Hopefully this can solve the excessive CPU/RAM usage some users have reported. Closes #1269
009f8d6
to
989e9f2
Compare
I've added a commit, and done some more testing. I believe this is good to go now. Note that I've removed the optimization based on module-level exclude fields for now. Turns out using module exclude fields would need more elaborate logic, in the case of overlapping module sources. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
6d30b7c
to
e2a64ae
Compare
Turns out using module exclude fields would need more elaborate logic, in the case of overlapping module sources. So I removed that optimization for now.
e2a64ae
to
7897520
Compare
What this PR does / why we need it:
This basically relies on optimizations already implemented in chokidar,
the library we use for file watching, in order to reduce overhead when using file watching on linux. Hopefully this can solve the
excessive CPU/RAM usage some users have reported.
Which issue(s) this PR fixes:
Closes #1269
Special notes for your reviewer:
In a large project folder, try adding exclusions via
modules.exclude
in the project config, or using theexclude
field in individual module configs.There are some potential alternative approaches, but I wanted to see if this works reasonably before doing something more elaborate.