summaryrefslogtreecommitdiff
path: root/mail/changes
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-20 02:52:17 -0400
committerKali Kaneko <kali@leap.se>2014-02-20 16:17:25 -0400
commit4648cb5a5cc6084d1949de7622def2c74c1de6e9 (patch)
tree7be6d990a7dd4b46b84b9c64f2b3430d7816e184 /mail/changes
parent9b20cd5042a3f0d351cadefb220b56b0bd6a9205 (diff)
mail parsing performance improvements
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.
Diffstat (limited to 'mail/changes')
0 files changed, 0 insertions, 0 deletions