-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
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.
Description
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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