Bug 259910 - kmail in kde4 is intermittently extremely (unusably) slow
Summary: kmail in kde4 is intermittently extremely (unusably) slow
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.13.5
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 02:18 UTC by Andrew MacFarlane
Modified: 2015-04-12 10:27 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew MacFarlane 2010-12-15 02:18:30 UTC
Version:           1.13.5 (using KDE 4.4.4) 
OS:                Linux

top does not indicate that kmail is taking too much cpu (a few %),

but the gui window responds incredibly slowly to changing to a new message or sending a message

there is a large amount of hard disk activity as measured by the LED monitor

according to lsof, there are quite a lot of open files, some of them big (I have several GB of email in many folders, up to 10s of k of messages in the bigger folders
 
this slowdown behaviour persists through a full system reboot

but it is intermittent - though I have not yet found out what controls it

it has now disappeared again - perhaps as I went to view attachments inline to as icons, though that might just be a coincidence - in any case no recent message had significant attachments.

I am considering moving to another mail client after using kmail happily for years, both in mandrake and opensuse distros

Reproducible: Sometimes




OS: Linux (i686) release 2.6.34.7-0.5-desktop
Compiler: gcc
Comment 1 Andrew MacFarlane 2010-12-16 01:02:33 UTC
having tested it: this problem is not controlled by the options for view attachments.

It is still intermittent, but manifests itself as a big slowdown of all the interactions with the GUI (buttons moving messages, changing folders etc)

Other Xwindows are operating normally, i.e. not slow. Only kmail is slow.
Comment 2 Frédéric COIFFIER 2010-12-17 17:15:54 UTC
I confirm this behaviour : each time you change the viewed folder, its content is refreshed slowly. It seems that KMail requests Akonadi for mail folder content at each time.
Comment 3 Nancy Anthracite 2011-02-22 21:15:33 UTC
I had a similar problem.  Try doing a tail on ~/.xsession-errors to see if it is searching for something it can't find as there were "results 0" or something like that while having an error looping through one directory after another, over and over.  What I did, and I am not sure what made it work, was to then try to do a small search (because it was SOOO SLOOOOOW) and stopped the search with the stop button.  That did not do it but then killing kontact after that using the kill command in top and the speed returned to normal both then and after a reboot.  Using the kill option offered to me when Kontact was not responding and rebooting had done no good at all, but this worked.

I think, but I am not sure, that I may have closed a search window without stopping the search first.  I am afraid to try it right now to see if I am right because I don't want to have this happen again and not be able to stop it during a busy day when I need to use Kontact regularly.
Comment 4 Nancy Anthracite 2011-04-07 16:12:44 UTC
I had the same problem this AM. The ~/.xsession-errors showed that there was a continuous search ongoing and Kmail was unusably slow. Killing kontact no matter what I tried did not work including rebooting.  The hard drive was being continuously accessed and the CPU usage was about 25% for Kontact (on a dual core machine).  Rebooting did not help. I finally went to System Settings, Advanced, Desktop Search disabled the Nepomuk services and applied it and then killed and restarted kontact. That fixed it.  I restarted the nepomuk services and killed and restarted Kontact again and it still was fine.
Comment 5 Christopher Yeleighton 2011-04-22 16:51:51 UTC
I get it in the message editor: I type and nothing appears for a minute or so.  It happens periodically.
Comment 6 Nancy Anthracite 2011-04-22 17:41:46 UTC
Now it is often slow when I open it and kontact is using 12-20% of the CPU, but it straightens out in about 5 minutes and then is fine.  When it happens, I have been looking for nepomuk and xsession errors and I don't see anything.  One time the message that it was finished compressing something so maybe re-indexing or compressing is what it is doing that is slowing things down.  I have a lot of messages, so I think it is pretty much no wonder that take a bit of time.
Comment 7 Andrew MacFarlane 2011-04-29 23:24:37 UTC
This particular problem seems to have disappeared after I removed the kmail button from the system tray.

Kmail on KDE4 is still much flakier than it used to be on KDE3 it often crashes for me by freezing up when I try to send a composed message.
Comment 8 Andrew MacFarlane 2011-06-08 20:53:46 UTC
I can reproducibly cause kmail to freeze by logging in and starting it via remote Xsession, then closing that instance - then starting kmail locally.

To avoid this I can restart my local Xsession before starting kmail. It seems kmail does not stop cleanly somehow
Comment 9 kde 2011-08-29 07:58:50 UTC
I have the same issue: I have several GB of email and Kontact re-reads every email upon startup. As my filesystem is encrypted, my machine becomes unusable for 15 minutes when I start Kontact/KMail.
Comment 10 Laurent Montel 2015-04-12 10:27:15 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.