Message255518
David: what is the email issue you mentioned? In the mean time, I am uploading a patch to this issue.
It seems using StringIO is a bit slower than str.splitlines(). I found a way to optimize building long lines, which compensated a lot of the loss, but this optimization would apply even without using StringIO. My patch makes test.test_email 0.3% slower (the optimization alone would make it 4.4% faster), and test_email.TestFeedParsers.test_long_lines() is 3% slower (optimization 12% faster).
I also tried two other alternatives to str.splitlines(), but they were both slower than the StringIO technique:
* _partial is a list of UTF-8 bytes; join and use bytes.splitlines()
* _partial is a UTF-8 bytearray; use bytearray.splitlines() |
|
Date |
User |
Action |
Args |
2015-11-28 01:34:32 | martin.panter | set | recipients:
+ martin.panter, barry, gregory.p.smith, ezio.melotti, r.david.murray, serhiy.storchaka, demian.brecht, scharron |
2015-11-28 01:34:32 | martin.panter | set | messageid: <1448674472.49.0.211543280013.issue22233@psf.upfronthosting.co.za> |
2015-11-28 01:34:32 | martin.panter | link | issue22233 messages |
2015-11-28 01:34:31 | martin.panter | create | |
|