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.

Title: Faster output if message already has a boundary
Type: performance Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: SilentGhost, barry, lpd, r.david.murray
Priority: normal Keywords: easy, patch

Created on 2005-07-23 17:04 by lpd, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
t.diff lpd, 2005-07-23 17:04 patch for Lib/email/
boundar_fix_fix.patch r.david.murray, 2010-12-20 21:36
Messages (6)
msg48605 - (view) Author: L. Peter Deutsch (lpd) Date: 2005-07-23 17:04
A simple change speeds up Message.as_string by more
than a factor of 2 if the message already has a defined
boundary, by avoiding a time-consuming RE compilation
and search.
msg48606 - (view) Author: L. Peter Deutsch (lpd) Date: 2005-07-23 22:08
Logged In: YES 

Sorry, forgot to enter this with the original submission:
Python 2.4.1, Red Hat Linux 7.3.
msg123849 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-12 20:33
Committed a simpler fix in r87196, backported to 3.1 in r87195, and 2.7 in r87196.
msg124404 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-20 21:36
Turns out there's a bug in my version of the patch, and no test in the email test suite traversed that code path.

Attached patch fixes this; I'll commit and backport after trunk unfreezes.  Note that the backport contains a second bug (calls self._make_boundary when it should be just _make_boundary)
msg124443 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-21 18:25
Committed test and fix in r87415, r87416, r87417.
msg126191 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2011-01-13 17:51
Issue #10901 was closed as a duplicate of this issue.
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42211
2011-01-13 17:51:58SilentGhostsetnosy: + SilentGhost

messages: + msg126191
versions: + Python 3.1, Python 3.2
2011-01-13 17:47:02SilentGhostlinkissue10901 superseder
2010-12-21 18:25:44r.david.murraysetstatus: open -> closed

messages: + msg124443
2010-12-20 21:36:06r.david.murraysetstatus: closed -> open
files: + boundar_fix_fix.patch

messages: + msg124404
2010-12-12 20:33:41r.david.murraysetstatus: open -> closed
resolution: fixed
messages: + msg123849

stage: test needed -> resolved
2010-05-05 13:44:52barrysetassignee: barry -> r.david.murray

nosy: + r.david.murray
2009-04-22 14:43:41ajaksu2setkeywords: + easy
2009-02-16 02:26:14ajaksu2setstage: test needed
type: performance
components: + Library (Lib), - Interpreter Core
versions: + Python 2.7, - Python 2.4
2005-07-23 17:04:07lpdcreate