Bug 130514

Summary: Slow KMail startup when kmailrc grows large
Product: [Applications] kmail Reporter: Robert Knight <robertknight>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: glua
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Callgrind profile of KMail startup with 440KB kmailrc
Smaller version of the kmailrc file mentioned in the report - hopefully it will still show the problem.

Description Robert Knight 2006-07-09 14:30:02 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Ubuntu Packages

The KMail startup time has become very long (15+ seconds).  I did some profiling with callgrind and it appears that KMail spends a lot of time processing config files, in particular, kmailrc.

My kmailrc file in ~/.kde/share/config had grown to 440KB.  Deleting the config file and forcing KMail to recreate it resulted in a 20KB file and a much shorter startup time.

On experimentation, the main culprit behind kmailrc growing is when I open a folder for the first time in my IMAP account.  This causes lots of state information to be written to the config file.
Comment 1 Robert Knight 2006-07-09 14:33:57 UTC
Created attachment 16928 [details]
Callgrind profile of KMail startup with 440KB kmailrc

Callgrind profile can be viewed using the kcachegrind tool.  Unfortunately I
forgot to save a copy of the huge kmailrc file before I deleted it, but I have
a smaller one which should still show the problem.
Comment 2 Robert Knight 2006-07-09 14:35:11 UTC
Created attachment 16929 [details]
Smaller version of the kmailrc file mentioned in the report - hopefully it will still show the problem.
Comment 3 Laurent Montel 2015-04-12 10:10:34 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.