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 · 3 comments

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.

@JustMyGithub
Copy link

Shouln't it be sufficient to use the default API in a seperate thread? Using undocumented APIs leads to suddenly disfunctional software on updates ...

@ThioJoe
Copy link

ThioJoe commented Sep 19, 2024

I think this is a duplicate of #159

Surprised even a workaround like disabling folder hashing hasn't been implemented yet.

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

4 participants