-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
fs.Dir.read() is very slow #29941
Copy link
Copy link
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.
Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.performanceIssues and PRs related to the performance of Node.js.Issues and PRs related to the performance of Node.js.
I maintain the popular
readdirpmodule. Decided to tryfs.opendirfrom node 12.12. The results are suboptimal: it's 3x slower to walk file trees when compared tofs.readdir.To reproduce:
if (opendir)toif (!opendir)I get 3x speedup, which means opendir is 3x slower than readdir.Refs: #583, #29349