-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite RAM usage can exhaust system #100
Comments
Fdir just crawls the directories, and yes, if you have an insane amount of items it may end up OOM-ing your app. What's the suggested outcome here? |
Readdirp have limits on ram usage due to its architecture. It can’t exceed X. |
readdirp will just emit files/dirs, right? so it won't really use much memory, as it isn't building up a list of found paths if the user turns the result into an array, they will hit the same issue fdir has. you can set alternatively, maybe we could introduce an option to pass a callback which will be called each time we visit a path, and we skip building up the internal set of paths (which means you can't use |
Well, stream APIs exist for a reason. Not always users want an array of 400K files. etc. |
Yes I think I'm completely missing the point of this package. It's fast so presumably you see the most benefits when crawling large directories... but then it returns millions of files without any way to process the data using a stream or callback API? Again not seeing the point at all. It's nice if you only have a few files I guess but then why bother with a third-party dependency, just use |
Stream APIs are inherently slow. I tested It's technically possible to run out of memory with |
RAM usage seems to be unlimited with the module. RAM requirements need to be clarified somewhere, because crashing apps is not ok.
The text was updated successfully, but these errors were encountered: