You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also stumbled on a similar issue (on windows) when npm cache contains lots of packages, I got this error:
Uncaught Error Error: EMFILE: too many open files,
Emitted 'error' event on Minipass instance at:
at (program) (internal/process/promises:265:12)
The reason for the issue is that cacache\lib\entry-index.js\lsStream function tries to asynchronously load all files and only then awaits the results.
When working with streams I would expect a different behavior: load data in portions (one-by-one or in chunks of X) instead of reading all files "in parallel".
As a workaround, I adjusted the source code locally and used regular for loops instead of those map functions:
Is there an existing issue for this?
Current Behavior
Calling ls.stream over a large store results large memory hit for all entries
Expected Behavior
An iterator which returns entries as needed
The text was updated successfully, but these errors were encountered: