diff options
author | Kali Kaneko <kali@leap.se> | 2014-02-20 02:52:17 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-02-20 16:17:25 -0400 |
commit | b2d97c9faef6037a065e2903afe5b0ab2624917e (patch) | |
tree | 268a86e5a668e604bfa8907a8d0f4a7025819238 /changes/feature_split_message_docs | |
parent | 66c5602b77547ec24674f5e40c1d244f28ff5a49 (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 'changes/feature_split_message_docs')
0 files changed, 0 insertions, 0 deletions