Message224516
Therefore the bug is that email parser is dramatically slow for abnormal long lines. It has quadratic complexity from line size. Minimal example:
import email.parser
import time
data = 'From: example@example.com\n\n' + 'x' * 10000000
start = time.time()
email.parser.Parser().parsestr(data)
print(time.time() - start) |
|
Date |
User |
Action |
Args |
2014-08-01 19:55:31 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, r.david.murray, tshepang, jader.fabiano |
2014-08-01 19:55:31 | serhiy.storchaka | set | messageid: <1406922931.12.0.296278221792.issue21448@psf.upfronthosting.co.za> |
2014-08-01 19:55:31 | serhiy.storchaka | link | issue21448 messages |
2014-08-01 19:55:31 | serhiy.storchaka | create | |
|