-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Consolidate common folders to avoid hitting the FSEvent limit #483
Conversation
// Decide whether or not we should start a new higher-level | ||
// parent watcher | ||
function couldConsolidate(path) { | ||
var candidates = {}; |
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.
Could you conform to our code style here please?
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.
Do you want the threshold variable at the top?
Also I noticed candidates
is no longer being used. I'll remove that.
EDIT: Also forgot some semicolons right below that. Sorry, I don't use them so I don't even think about it. Adding 'em in.
Fixed style. I think, let me know if it's still not right. |
} | ||
|
||
// Find the parent of a given path | ||
function parentOf (path) { |
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.
sysPath.dirname
??
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.
Fixed. Sorry, didn't realize that dirname
worked for directories parents as well.
Any chance we could get a patch version bump for this so I can start using it in watchify without maintaining a fork? |
@es128 Here's the PR for #482. Let me know if you want me to fix anything up or change it.
It does a great job on my project. Goes from 200+ instances to 19-35 (it's somewhat non-deterministic because the way the algorithm works, it depends on the order they accumulate in).