Bug 172519

Summary: Kmail extremely unresponsive for some time after startup
Product: [Unmaintained] kmail Reporter: tony
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: axel, bjoern, david.nolden.kde, post
Priority: NOR    
Version: 1.10.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description tony 2008-10-10 14:31:02 UTC
Version:           1.10.1 (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

For several minutes after startup, Kmail is extremely unresponsive. It takes many seconds, for example, to launch a composer window. Once launched there is a long delay between clicking on the "to" field and that field actually getting selected and accepting input.

I believe the problem is probably related to a large number (approximately 100 at last start up) of messages that appear in .xsession-errors:

kmail(6860) KMSearch::slotSearchFolderResult: "ClassifiedHam" found 0

(where the number at the end of the line varies between 0 and 6.

I am unable to say whether or not this problem is new in the latest release of KDE4, as Kmail is auto-started when I log in and I don't often try to use it immediately after it's started. The behaviour is also not consistent; as a test, I just closed Kmail and restarted it and found it to be immediately responsive, with none of the above messages being produced.

Just a guess; could this be something to do with expiring old messages? All my directories are configured to do this.
Comment 1 David Nolden 2009-05-14 10:37:13 UTC
I recently also have this problem. When I start kmail on the command line, it is spammed with such things for a long time:
kmail(2601)/kmail (storage internals) KMFolderMaildir::getDwString: KDE_fopen(abs_file= "/home/nolden/.kde4/share/apps/kmail/mail/SOC/cur/1241303327.3849.6LKuG:2,S" , "r+") == stream ==  0x2496ed0
kmail(2601)/kmail (storage internals) KMFolderMaildir::getDwString: fclose(mIndexStream =  0x2496ed0 )                                                                                                                         

With occasionally such a line in between:
kmail(2601) KMSearch::slotSearchFolderResult: "SOC" found 0

I have the feeling that it's loading all my mails from disk, and I have a very large archive. This makes kmail nearly unusable.
Comment 2 Axel Schmidt 2009-11-15 16:49:06 UTC
kontact: 4.3.2
kmail: 1.12.2
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-14-generic x86_64
Distribution: Ubuntu 9.10

I had the same problem and hoped with changing to KMail 1.12.2 the problem was fixed, but only for one week. :( Now i have the same problems since bevor.
The only change is that the message when start kmail from command line doesn't come like in the previous version and the message above.

I think also that kmail read all my emails in my local email folder when i starting kmail. I have there over 160.000 emails with over 16GB disk space.
So kmail needs over 30(!) minutes bevor i can use it!!!
Comment 3 Axel Schmidt 2009-11-15 17:10:12 UTC
Could it be the same like bug https://bugs.kde.org/show_bug.cgi?id=190932
Comment 4 Ralf Jung 2009-12-24 11:16:18 UTC
I can confirm this problem for KDE 4.3.2, Kubuntu packages, KMail 1.12.2. The lockup lasts for about a minute. However, I can't find error messages in .xsession-errors for this time. In addition, I don't have any folders set to expire mails. My archive (spread on about 30 folders) contains about 4000 to 5000 mails and has a size of about 750MiB - that should really not be that much, I think.

> The behaviour is also not consistent; as a
> test, I just closed Kmail and restarted it and found it to be
> immediately responsive, with none of the above messages being produced.
I have the same behaviour, too - however, after wildly clicking some mails to read them, it starts getting slower, ending in exactly the same 1-minute-lockup as usual. It seems the lockup appears on startup only if there is new mail, otherwise, it'll appear later.

> I think also that kmail read all my emails in my local email folder when i
> starting kmail. I have there over 160.000 emails with over 16GB disk space.
> So kmail needs over 30(!) minutes bevor i can use it!!!
Seeing that you have about 30 times as much mails as I have, and that startup takes 30 times as long for you as for me, this seems quite plausible. My PC has 2,1GHz (2 cores, but only one is used by KMail) and 2GiB of RAM.
Comment 5 Björn Ruberg 2010-01-29 00:38:54 UTC

*** This bug has been marked as a duplicate of bug 166653 ***