-
Notifications
You must be signed in to change notification settings - Fork 8
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
Slow for very large folders #22
Comments
Hello Adam This package is not the fastest because it strikes a balance between usability, maintainability, and speed. There might be some way to shuffle the code around to improve speed without impacting the other concerns, but it is not obvious - you are very welcome to experiment with that and submit a PR if you find anything. You can take the code from this package and improve it specifically for speed in your use case. One big thing you can do, is implement multi-threaded folder traversal, which would utilize all of your CPU's power, compared to the single core that this package uses. We might even accept a PR to add that functionality here as well. If you want the absolute best performance, you should look into rewriting the code in Rust and compiling it to WebAssembly. That has the potential to significantly improve speed, but it is hard to say how big the improvement will really be. Other than that, I can only think of maybe using a faster runtime engine, such as Bun. |
Thanks will take a look |
I implemented one with go. Currently, cli is faster than the Current package。Later, I will improve a version of WebAssembly 🥰 |
@markthree nice work! |
I tested that wasm implemented with go cannot call the io api 😂 |
All right, my node version is too high 😂 The wasm of go can be run 🫣 |
Hi There
Is there a way to speed this up for very large folder ( aprox 63TB) it take a long time to calculate
I am using it as such
stats.size = await getFolderSize.loose(p);
Thanks
adam
update, i dont need file sizes just folder
The text was updated successfully, but these errors were encountered: