This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, jader.fabiano, r.david.murray, serhiy.storchaka, tshepang
Date 2014-08-01.19:55:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:\n\n' + 'x' * 10000000
start = time.time()
print(time.time() - start)
Date User Action Args
2014-08-01 19:55:31serhiy.storchakasetrecipients: + serhiy.storchaka, barry, r.david.murray, tshepang, jader.fabiano
2014-08-01 19:55:31serhiy.storchakasetmessageid: <>
2014-08-01 19:55:31serhiy.storchakalinkissue21448 messages
2014-08-01 19:55:31serhiy.storchakacreate