Serhiy Storchaka added the comment: 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: exam...@example.com\n\n' + 'x' * 10000000 start = time.time() email.parser.Parser().parsestr(data) print(time.time() - start) ---------- nosy: +serhiy.storchaka versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21448> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com