Bug 279204

Summary: kmail uses excessive memory
Product: [Applications] kmail2 Reporter: Marcel Wiesweg <marcel.wiesweg>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: alexandre.bonneau, hvengel, kdebugs, montel, smartins
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcel Wiesweg 2011-08-02 19:46:28 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

When opening folders which contain a few more mails (> 10000) kmail starts to eat a lot of memory - memory usage easily above 1GB and growing. KMail1 managed to load these folders instantly.
Note that KMail is in bad company with the mixedmaildir resource, which eats about just as much memory.
KMail is also extremely slow (minutes) opening these folders, which may be a separate bug or the same problem.

Reproducible: Always

Steps to Reproduce:
Open a folder with mails

Actual Results:  
Takes minutes and 2GB of memory

Expected Results:  
Happens fast (<1sec) and with moderate memory usage

OS: Linux (x86_64) release 3.0.0-1-desktop
Compiler: gcc
Comment 1 Laurent Montel 2011-08-03 12:03:00 UTC
akonadi_mixed_mail ?
Comment 2 Marcel Wiesweg 2011-08-03 17:35:47 UTC
Yes. Traditional ~/Mail setup (2.3 GB) and pop3 accounts. (KMail from 4.7 release said its version was 4.7 which I cannot select in the dropdown thus "unspecified".)

The resource is using memory in the same order of magnitude (bug #260647)
Comment 3 Alexandre Bonneau 2012-01-09 21:06:06 UTC
"KMail is in bad company with the mixedmaildir resource", in fact, kmail is in bad company with the maildir resouce too.
I'm observing the same kind of behavior here with kmail eating memory and beeing awfully slow to display selected mail.

Linux mycomp 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
kmail 4:4.7.4+git111222-0ubuntu0.1~ppa1
my mail folder is perhaps a bit big (6 GB), but kmail1 could manage that without delay
Comment 4 Hal V. Engel 2012-01-22 05:17:36 UTC
I have the same issue.  My distro now installs kmail2 (IE. 4.7.x) by default when upgrading to KDE 4.7.x and it is a total DOG and is almost unusable.  It eats memory like crazy and makes my machine run like crap to the point where I can't use it while kmail2 and related software are running.  Akonida and related software are also crap that uses large amounts of CPU and RAM.  How can all of these resources be needed by a MAIL program?  It just does not make sense.  Why is kmail 4.7.4 a "stable" release when it runs more like an ALPHA version? 

Please fix this.
Comment 5 Sergio Martins 2013-07-12 18:31:33 UTC
Still happening ? Please report the exact names of the processes that are eating memory.
Comment 6 Alexandre Bonneau 2013-07-13 18:10:19 UTC
A lot have changed regarding kmail sluggishness over the past year and a half ; if I remember correctly, that problem was fixed in 4.8.3 or 4.8.4.
Right know with 4.10.5, kmail is ok at displaying any mail, local or remotely.
It sure isn't instant like before akonadi, but it's clearly usable.
Comment 7 Alexandre Bonneau 2013-07-13 18:14:12 UTC
...and it uses 196 MiB or RAM to manage approximatively 9,7 GiB of mails.
Comment 8 Sergio Martins 2013-07-14 03:37:29 UTC
(In reply to comment #7)
> ...and it uses 196 MiB or RAM to manage approximatively 9,7 GiB of mails.

Closing then