4 ms·
In an alternate history, what would have been a good way for node.js to reduce the number of stat calls? What would the tradeoff be?
by pekk 11y ago
In an alternate history, what would have been a good way for node.js to reduce the number of stat calls? What would the tradeoff be?
- kevinburke 11y agoMay want to check out the patch - after a syscall in a directory failed because the directory didn't exist, node would issue 4-5 additional stat() calls for the other filetypes (.js, .index.json, .json, .coffee, etc) even though the directory didn't exist. Solution was to abort after the first failed stat(). https://github.com/nodejs/io.js/pull/1920 https://github.com/nodejs/io.js/pull/1920