More Info

Revision 1182123

(Back to digest)
 

Optimization in KDE-PIM

Volker Krause committed changes in /trunk/KDE/kdepimlibs/kimap:

Optimize some hotspots in the IMAP parser:
- avoid the non-const operator[] of QByteArray, it's slightly more expensive than the const version (or at()) and we call it several hundred million times during a mail check
- don't clear the internal parser buffer for every line received from the server, but only every 4kB of read data

Together this saves about 20% CPU time in the IMAP resource. It also uncovered a bug in the parser causing a out of bounds access to the internal buffer.

File Changes

Modified 2 files
/trunk/KDE/kdepimlibs/kimap
 
/imapstreamparser.cpp
 
/imapstreamparser.h
2 files changed in total