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

Deleting files on windows is slow #42

Closed
arsenetar opened this issue May 22, 2020 · 2 comments
Closed

Deleting files on windows is slow #42

arsenetar opened this issue May 22, 2020 · 2 comments

Comments

@arsenetar
Copy link
Owner

In certain cases deleting a large number of files in windows is seen as being much slower than through explorer. I did some investigation on this over at arsenetar/dupeguru/issues/664. I was curious if the IFileOperation interface would provide a faster means of interacting with the windows API, this was technically correct although not a huge savings. I did find that by batching delete operations to the API (using IFileOperation) did have pretty significant time savings (around 70-75% less time). It does appear this can be done with SHFileOperation as well so I might give that a try as well.

Is supporting a list of files to trash something that makes sense to support? If a platform driver does not support bulk operations then it could just loop over them instead of truly batching.

@ghost
Copy link

ghost commented May 22, 2020

Yes, it would be a fine addition to the library.

@arsenetar
Copy link
Owner Author

Looks like I just need to update the unit test to include a case where multiple files are specified, right now my branch is passing tests (but not testing lists). I'll get a PR open once I get through 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

1 participant