Jump to content

Delete performance


signe

Recommended Posts

The method that uTorrent uses to delete files from disk is incredibly slow. This, combined with the fact that all deletions seem to be done in the UI's worker thread, can cause huge performance problems. Torrents with lots of files (thousands) can sometimes take on the order of minutes to delete from disk. Even if a single torrent doesn't contain thousands of files, if you delete several torrents at once, this can also take minutes. While this is occurring, the UI is completely inaccessible, and the CPU is being over-utilized for a simple delete.

The length of time to perform the deletes would be less of an issue if the work was passed off to a background thread instead of being performed by the UI. Alternately, it wouldn't be an issue if the UI did it if the routines that performed the deletes were faster. The deletes that cause problems can be handled in explorer, even across a network, in a matter of seconds.

This is a long-standing problem that has plagued me, but today it hit a head because my torrent system froze twice (1.8.3). I've also been testing 2.0b, but the issue seems unchanged there.

Yes, this machine has antivirus - yes, I've tried it both with AV enabled and disabled. It doesn't make a noticeable difference either way, though I am going to assume that my freeze issue (which is not what I'm reporting) was a combination of AV + uTorrent.

Edit:

Turning off gui.delete_to_trash makes a *significant* impact. Only went in and tried this for the first time right now.

Link to comment
Share on other sites

Great info, and it completely jives with what I'd been theorizing, thanks.

I'd suggest that even if the problem itself isn't addressed, that maybe the "Use Recycle Bin" option be moved somewhere more prominent outside of the advanced options. (These scare normal users with the "DO NOT MODIFY" heading.)

Edit: I'm still not clear on why Explorer can do it so much faster than uTorrent, but at least now the background's clear.

Link to comment
Share on other sites

Not sure; speculatively... perhaps µTorrent calls the function once for each file, which can add up. I do believe it's possible to batch multiple file deletes into one call (by delimiting multiple files using a single null character, and terminating the entire string using a double null) -- maybe Explorer does that instead.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...