summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/parser.py
AgeCommit message (Collapse)Author
2014-02-20mail parsing performance improvementsKali Kaneko
Although the do_parse function is deferred to threads, we were actually waiting till its return to fire the callback of the deferred, and hence the "append ok" was being delayed. During massive appends, this was a tight loop contributing as much as 35 msec, of a total of 100 msec average. Several ineficiencies are addressed here: * use pycryptopp hash functions. * avoiding function calling overhead. * avoid duplicate call to message.as_string * make use of the string size caching capabilities. * avoiding the mail Parser initialization/method call completely, in favor of the module helper to get the object from string. Overall, these changes cut parsing to 50% of the initial timing by my measurements with line_profiler, YMMV.
2014-01-09Convert unicode to str when raising in IMAP server (#4830).drebs
2014-01-08First stage of the storage schema rewrite.Kali Kaneko
* Separates between flags, docs, body and attachment docs. * Implement IMessageCopier interface: move and have fun! This little change is known to push forward our beloved architect emotional rollercoster. * Message deduplication. * It also fixes a hidden bug that was rendering the multipart mime interface useless (yes, the "True" parameter in the parsestr method). * Does not handle well nested attachs, includes dirty workaround that flattens them. * Includes chiiph's patch for rc2: * return deferred from addMessage * convert StringIO types to string * remove unneeded yields from the chain of deferreds in fetcher
2013-12-26Split the near-2k loc file into more handy modules.Kali Kaneko
...aaaand not a single fuck was given that day!