Revision 1182123(Back to digest)
Optimization in KDE-PIM
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.