akonadi and CPU

René J.V. Bertin rjvbertin at gmail.com
Sat Apr 1 09:30:11 BST 2017


On Friday March 31 2017 15:30:26 Daniel Vrátil wrote:

Thanks Dan. 

I had a hunch of what you wrote which is why I didn't rush to follow Pablo's suggestions.

>This is KDEPIM4, so metric tonn of messages goes through DBus. Blame crappy 
>DBus implementation :-)

You mean the implementation of the communication-via-DBus protocol, not the DBus daemon itself, right? ;)

>> akonadi_imap_agent
>
>That's the guy checking your emails. It needs to parse all the downloaded 
>messages and then do a bunch of checks to know if they are new ones or 
>existing ones, which takes some CPU. There are places for improvement, 
>definitely. Like for instance not parsing the message body, because all we need 
>to know is in the headers....

Doesn't IMAP have a number of provisions to make this more efficient or at least have a good part of the work done on the server? IIRC it has at least the possibility to fetch headers only, and I vaguely recall you could give the the server the ID of the newest message you already know.

I could totally (continue to :)) live with the possibility to have indexing info only for the messages I actually opened at least once.

>DBus was the killer in KDE4. Nowadays it's out of the game, but we still suck 
>at not doing lots of useless SQL queries. One day, maybe, I'll get to fix it 

What surprises me is that I the CPU burning is so much more noticeable on Mac than on my Linux systems (newer but considerably lower-end hardware). I'm using a build from the git/4.14 branch on the Mac while I'm still at good old stable 4.13.3 on Linux, maybe that explains part of the difference? Otherwise we might indeed be looking at differences in the dbus-daemon itself, and QtDBus.

R.



More information about the kdepim-users mailing list