SEP
18
2008

32 times faster deleting your home directory

Yes, KDE-4.2 will be 32 times faster deleting a large number of files compared to KDE-4.1!

I was looking at the highest-voted bugs last Monday (yes, voting _is_ useful in bugzilla, some people weren't sure about that), and bug 43356 (260 votes) was about konqueror taking too much time deleting a large number of files (in kde-3.0, but still true in 4.1).

I first made the KIO job itself 25 times faster for local files, but then it turned out that the KIO job was anyway "only" taking 35 seconds, out of the 8 minutes that konqueror-4.1 took for deleting 5000 times. The other 7 minutes and a half were spent updating the itemview, removing rows one row at a time. Ooops.

After making KDirLister emit a new itemsDeleted() signal with all items, and KDirModel processing this in a more clever way, the view is now told about the 5000 removed rows in one call, and deleting 5000 files with konqueror-trunk (or dolphin, same code) now takes only 15 seconds. That's 32 times faster.

Conclusions: Bugzilla rocks (and users report useful issues, we as developers never test enough of these large-datasets cases). Qt model/view rocks (there was no way to optimize this that much in Qt3). But, there are too many bug reports for a lifetime of bugfixing, unfortunately.

Comments

Performance improvements like these are awesome!
I've used rm many times because I had a feeling that Konqueror/dolphin were taking way to long to do it. Now, it seems, I don't have to do that anymore :-)
Thanks a lot!

Best regards
Pascal


By pascal_a at Thu, 09/18/2008 - 12:12

same here.

thanks!


By mxttie at Thu, 09/18/2008 - 14:06

I had a rant about this last year... remember it well :)

Thank you so much for making this happen finally!


By carnager at Thu, 09/18/2008 - 14:28

Great to see more optimized code. Instant on become more realistic every time people do things like this ;).


By theriddle at Thu, 09/18/2008 - 13:17

you forgot one thing from your conclusions: You developers rock! :D


By martin sandsmark at Thu, 09/18/2008 - 17:54

Great to hear about these optimization of codes.
Now, what about having a look at digikam? It takes a long time to update the images when browsing a folder with many photos. Picasa do not have this problem at all.


By dajomu at Sun, 09/21/2008 - 20:49

Sorry I have enough bugs to fix in konqueror/kio/kioslaves/kdeui/libkonq/dolphin/etc already. For digikam, please report a bug on http://bugs.kde.org and/or investigate where the problem comes from.


By David Faure at Mon, 09/29/2008 - 09:09

... then I can maybe do the same to kio_fish which is as well reported to be very slow.


By tstaerk at Tue, 09/23/2008 - 09:13

As you can see, most of the fixes where in KIO, and therefore apply to all kioslaves automatically. If kio_fish is still slow, then one has to profile it to find out why.


By David Faure at Mon, 09/29/2008 - 09:04

Another few hours until it comes back, apparently.

http://news.opensuse.org/2008/10/10/power-outage-in-area-where-most-opensuse-servers-are-located


By David Faure at Fri, 10/10/2008 - 10:59

Pages