Revision 68ac229...

Go back to digest for 24th November 2013

Optimization in KDE-PIM

Jan Kundrát committed changes in [trojita] /Imap:

IMAP: speed up the FETCH response parsing

Previously, the code would happily hit the LowLevelParser::parseList even on the
top-level level, which is rather expensive. Instead of that, this change parses
the individual data fields separately and takes into account the knowledge of
the expected data type. Furthermore, the order in which these fields are checked
against is changed so that FLAGS, UID and MODSEQ are checked first because these
are going to be the most widely encountered entities during mass-syncing, which
was traditionally the bottleneck.

A high-level measurement: the whole test suite takes 9.5 seconds instead of
11.5, i.e. this is a 17.5% speedup.

File Changes

Modified 4 files
  • /Imap
  •   tests/test_Imap_Parser_parse.cpp
  •   src/Parser/LowLevelParser.cpp
  •   src/Parser/LowLevelParser.h
  •   src/Parser/Response.cpp
4 files changed in total