Author martin.panter
Recipients barry, demian.brecht, ezio.melotti, gregory.p.smith, martin.panter, r.david.murray, scharron, serhiy.storchaka
Date 2015-11-28.01:34:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448674472.49.0.211543280013.issue22233@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2015-11-28 01:34:32martin.pantersetrecipients: + martin.panter, barry, gregory.p.smith, ezio.melotti, r.david.murray, serhiy.storchaka, demian.brecht, scharron
2015-11-28 01:34:32martin.pantersetmessageid: <1448674472.49.0.211543280013.issue22233@psf.upfronthosting.co.za>
2015-11-28 01:34:32martin.panterlinkissue22233 messages
2015-11-28 01:34:31martin.pantercreate