Let me elaborate a bit.
I'm comparing two HD (never heard about "backup"? ) with a lot (let's say 200,000) of files.
If I add or overwrite (i.e. copy) a file from a disk to the other, the operation is almost istantaneous. (Well, it depends , but let me say it takes a "normal" time.)
If I delete a file, it takes a lot of time because the list is re-sorted and then the directory list is reloaded.
Is all that work really needed for a simple delete?
Why it takes so long to remove a file?
Re: Why it takes so long to remove a file?
These are two different scenarios. During file copy, in most cases, there's no need to refresh the whole views since they already have placeholders for copied items. During deletion list items have to be removed, and it's more complicated. There was an attempt (long time ago) to make view refresh unnecessary but it failed to cover all possible scenarios, so we reverted the code to refresh the views.
By the way, what takes long time is not typically sorting of items but rather filling the list views. And even with thousands of items it takes very little, unless, of course, you are dealing with hundreds of thousands or millions of files.
By the way, what takes long time is not typically sorting of items but rather filling the list views. And even with thousands of items it takes very little, unless, of course, you are dealing with hundreds of thousands or millions of files.
psguru
PrestoSoft
PrestoSoft
Re: Why it takes so long to remove a file?
Yes, right.By the way, what takes long time is not typically sorting of items but rather filling the list views.
Well, in my case we are talking of about 3..5 seconds, and when you're removing many (groups of) files the thing quickly becomes tedious.And even with thousands of items it takes very little, unless, of course, you are dealing with hundreds of thousands or millions of files.
So, there's really no simple way to remove items from a list other than redoing the list from scratch?
Re: Why it takes so long to remove a file?
For the current version, no other way. I would suggest that you remove multiple items at a time if possible, to reduce the number of refreshes (interestingly, for me it takes less than 1 second for about 300,000 items).So, there's really no simple way to remove items from a list other than redoing the list from scratch?
We'll review this design for the next version and see what can be done to improve performance of deletion with large number of list items.
psguru
PrestoSoft
PrestoSoft
Re: Why it takes so long to remove a file?
Well... thank you for trying.
Re: Why it takes so long to remove a file?
One more detail: the time delay is almost independent on the number of deleted files.
This makes sense since it's not the deletion itself that causes the delay.
Unless, of course, you remove a significant part of the files!
This makes sense since it's not the deletion itself that causes the delay.
Unless, of course, you remove a significant part of the files!