10 times faster deleting a directory (different use case)

Yes, very much like my previous blog post some time ago, but for a slightly different use case. Last time it was about deleting 10000 files viewed in dolphin/konqueror, using "select all", while this time it's about selecting ONE directory and deleting it - the recursive listing involving multiple ioslaves took far too much time. This became the highest-voted bug assigned to me - bug 174144 - so it's fixed now. kio_file implements recursive deletion itself using QDirIterator, and announces this capability (a mechanism that was already in place for kio_trash).
Result: from 20 seconds to 2 seconds for deleting 5000 subdirs.
Well, that's it. Tell me if that was boring, I'll stop blogging :-)

In other news, mysql doesn't lock up on bugs.kde.org anymore since the upgrade to bugzilla-3.2. Finally! Keep voting on the bugs & wishes that matter to you, I hate having to decide myself what is important and what is not.


Hey, you need to stop this... you are ruining all our lifes by speeding up our computers. This kind devices should be slow... you understand? _slow_. You should make the 1 + 5000 subfolders deleting to happend in 5 minutes... Even Microsoft did understand this on the Vista! But they needed to "fix it" by demands of corporation leaders because employees got too much time to do other things same time when computer was working behalf of them.

So shame on you...!

Mayby you could slow down the file processing like... deleting one 500KiB file from memorystick could take... 45 seconds and deleting a one empty folder would take about 15 seconds?

This way we could faste create a new folder when boss is coming by pressing F10 + Enter + Del and she/he could see we are working. And this way companies would get reasons to buy new faster computers and economic would get more healthy. So you are actually the fault to make whole economy crisis by doing this kind "fixes". Have you ever heard "butterfly effect"?

(yes, that was sarcasm... THANKS A LOT for this kind speed ups!!! I Just LOVE the speed what it takes these days to delete files :-D)

By fri13 at Wed, 02/18/2009 - 13:24

We could have a "panic" key shortcut that pops up a fake file-copy dialog for when your boss comes in ;-)

I'm reminded of games which had a panic button popping up a fake spreadsheet window.

By David Faure at Wed, 02/18/2009 - 18:02

the "Boss Key"

I think I implemented something like this during my Kmud times.
Not bringing something else up but rather hide Kmud really well :)

By krake at Wed, 02/18/2009 - 21:46

Thanks for that great improvement! I love those features under the hood. Don't stop! Give us more, more, more of those!

By ungethym at Wed, 02/18/2009 - 17:04

Thank you very much. That's my personal 4.3 killer-feature even if it means, that I am able to accidentally delete 10 times as much files as before now :-)

By Sebastian Sauer at Thu, 02/19/2009 - 01:51

Wow finally KDE is on par with other DE's, regarding file deletions - i hope this also affects scanning dirs when moving/copying them.

Will this be in 4.2.x?

By carnager at Thu, 02/19/2009 - 11:29

Good stuff, keep watching the votes and keep fixing these bugs - I love to learn from your commits.
What is that? "mysql doesn't lock up on bugs.kde.org anymore"? What do you mean, mysql used to lock bugs?

By tstaerk at Wed, 02/25/2009 - 09:21