Skip to content
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

Please, do not automatically scan a folder if it contains too much files #206

Open
haojiezhe12345 opened this issue May 2, 2024 · 1 comment

Comments

@haojiezhe12345
Copy link

In normal situations, when clicking on the "Hashes" tab of a folder properties dialog, it automatically starts scanning all the files inside it. This will not cause too many lags when the folder contains <1,000 files. However, if I have a folder with 100,000+ files with a total size of hundreds of GB, it freezes when clicking on "Hashes" for seconds, after that it starts scanning all the files inside it! Taking 100% activity time of my SSD and continuously increasing the RAM usage, which eventually freezes the whole system. The "Cancel" button (which cancels the hash calculation) no longer responds, I have to manually kill "explorer.exe" to stop the hashing process to get my system back to normal.

I strongly recommend that automatic scan should only be started if the file count is <1000, preventing system freezes when user accidentally clicks on "Hashes" of a very large folder.

@namazso
Copy link
Owner

namazso commented May 5, 2024

The main problem is that directory iteration is synchronous. And that's because Win32 only has synchronous APIs. However there's the undocumented NT API which does support asynchronous directory listing.

The eventual goal is to rewrite OpenHashTab to utilize that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants