-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
builtins.readDir currently performs stat calls for each directory entry. This is bad enough that @aakropotkin works around readDir with a generated file. A fast readDir may allow Nixpkgs to replace all-packages.nix over time; a project that the Nixpkgs Architecture Team is researching.
Describe the solution you'd like
Implementation 1, posix compatible:
Fill the attrset with thunks that call pathType #3096
Implementation 2, linux optimized:
Use getdents or getdents64
Describe alternatives you've considered
Avoid readDir on large directories, generate a list of files. The readDir function is not crucial for the architecture team proposal.
Additional context
Reactions are currently unavailable