Join GitHub today
module: skip directories known not to exist #9196
There is no point in trying to search for files in a directory that
Reduces the total number of stat(2) calls and the number of stat(2)
Reduces the total number of package.json open(2) calls and the number
Here is what the access pattern looked liked before this pull request. (File paths shortened for brevity.)
Note how the last four are guaranteed to fail because of the first one.
Oct 24, 2016
It should be a zero-risk back-port but then again, no one complained it's slow. The most compelling reason would be to avoid future merge conflicts but OTOH, lib/module.js doesn't see all that many updates so probably not much of an issue. /stream-of-consciousness
Don't bother, it's fine.