Version: (using KDE KDE 3.5.2) Installed from: Compiled From Sources Compiler: gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux) Standard x86 SuSE 10.0 gcc/g++ installation; compiled from sources; -g -O OS: Linux Due to the way my spam filtering works, most of my mail is moved directly to the trash folder. After a couple of weeks it gets to 50000+ entries, and I have to empty it. The problem is that kmail takes forever to do this - often overnight - and sometimes I think it is looping, kill it and restart, and the trash is empty. I think it should take maybe a couple of minutes to delete 50k messages - not hang or run overnight. This is a standard SuSE 10 x86 install, with a konstruct-compiled KDE 3.5.2 which otherwise works fine. The underlying filesystem is the default SuSE 10 one, which I think is ReiserFS 3. Shouldn't kmail be built on top of a database engine, so that these operations with huge numbers of mail messages run reliably in reasonable time?
IIUC then this is a local trash folder, right? Moreover, I assume it's a maildir folder. I suggest using message expiration to control the number of messages in your trash folder. Then messages which are older than a specified amount of days will be deleted automatically. The deletion happens periodically in the background so each time only a small number of messages will be deleted. As for the db engine, in KDE 4 we'll use one in our new backend.
> IIUC then this is a local trash folder, right? yes. On a local IDE disk with no obvious performance problems, on a 1.7 GHz P4 with 1G memory. > Moreover, I assume it's a maildir folder. yes > As for the db engine, in KDE 4 we'll use one in our new backend. That would be good. Please make sure it scales well. I tried again to delete the 54000+ trash messages and kmail had still not completed after 569 CPU minutes (== overnight).
KMail takes about 1 minute (60 boring seconds, which is still to much) here to delete 17,000 e-mails from my local maildir trash folder. (Gentoo Linux, compiled from source, KDE 3.5.5, KMail 1.9.5.) There's also heavy load (100% CPU time) on the machine, since KMail seems to a) first mark and b) then delete every single e-mail in the folder. Wouldn't it be possible to delete and then re-create the local (trash) folder on a filesystem level, just like when a user starts KMail for the first time? It would take < 1 second in this case - at least, if it's a local folder.
*** This bug has been marked as a duplicate of 135717 ***