Bug#401225: kmail takes too long to delete messages
I was manually migrating some of my old mail from Mozilla to Kmail, using a
single ~450MB mbox file as input to Kmail. I have Kmail configured to use
~/Mail as the directory with mbox files as the default format.
Kmail loaded the new mbox fine: ~33,000 new messages. I sorted the messages
by date, selected the messages I wanted to trash, and hit the "delete" key.
Kmail took about 5 minutes at pegged CPU to move 20,000 messages (110MB) to
Trash. Then I right-clicked Trash and selected "Empty Trash". Kmail took an
additional 5 minutes at pegged CPU to empty the Trash folder.
It's OK for the first step (moving to Trash) to take a couple minutes -- the
mbox must be rewritten to disk sometime. However, the second step (emptying
Trash) should be essentially instantaneous. Emptying an entire folder should
be equivalent to 'rm filename'.
I moved to Kmail largely due to its speed improvements over Mozilla. In this
case it IS still a lot faster -- Mozilla took about 40 minutes to delete only
10,000 messages -- but it is still embarrassing to blow 10 minutes of 2.4GHz+
CPU to manipulate only 300MB.
$ dpkg --status kmail:
Status: install ok installed
Maintainer: Debian Qt/KDE Maintainers <firstname.lastname@example.org>
Replaces: kdepim-dev (<< 4:3.4.0), kdebase-data (<< 4:3.4.0)
Provides: imap-client, mail-reader