[PatchDiscussion] optimise the bottom-quoting regexp a little.. I suspect it's blowing up memory on mailin
[email protected] (zwiki-repo)
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <20080213123347.232737804A__42673.6860107214$1202906137$gmane$org@mail.joyful.com> |
Wed Feb 13 04:30:18 PST 2008 Simon Michael <[email protected]> * optimise the bottom-quoting regexp a little.. I suspect it's blowing up memory on mailin diff -rN -u old-ZWiki/Extensions/mailin.py new-ZWiki/Extensions/mailin.py --- old-ZWiki/Extensions/mailin.py 2008-02-13 04:33:46.000000000 -0800 +++ new-ZWiki/Extensions/mailin.py 2008-02-13 04:33:46.000000000 -0800 @@ -507,8 +507,8 @@ # return folder def stripBottomQuoted(body): - origmsg = '(Original Message|message d\'origine)' # XXX i18n.. ? - body = re.sub(r'(?smi)^-+ ?%s ?-+$.*' % origmsg, '', body) + origmsg = '(?:Original Message|message d\'origine)' # XXX i18n.. ? + body = re.sub(r'(?smi)^-+%s-+$.*' % origmsg, '', body) return body -- forwarded from http://zwiki.org/PatchDiscussion#[email protected]