Article View: news.software.nntp
Article #59522Re: innd perl filter slowdown ?
From: Miquel van Smoorenburg
Date: Mon, 08 Jul 2002 10:59
Date: Mon, 08 Jul 2002 10:59
33 lines
2235 bytes
2235 bytes
In article <ag9ofv$8iq$1@wonderland.linux.it>,
Marco d'Itri <abuse@1.2.0.1.0.0.1.e.f.f.3.ip6.int> wrote:
>miquels.at.cistron.nl.spamtrap@netscum.nl wrote:
>
>>sub is_binary {
>> ($hdr{__BODY__} =~ /(?:^[ \t|>]*(?>M[\x20-\x60]{60,61})\s*\r?\n){40}/mo
>> or $hdr{__BODY__} =~ /(?:^[
>\t|>]*(?>[A-Za-z0-9\+\/]{59,76})\s*\r?\n){40}/mo);}
>>
>>I found an article of 139 lines that takes some seven seconds to be processed
>>by the expression above. Replacing
>>
>> \s*\r?
>>with
>> [ \r]*
>I suppose the problem is * followed by ?.
I tested it, and yes, that is the problem.
>Anyway, since \s matches \r too I can just remove \r?
I tested that as well and changing \s*\r? to \s* works just fine.
>I will make a new release in a couple of days.
In that case this might come in handy:
sub is_yenc {
$hdr{__BODY__} =~ m/^=ybegin[^\n]+\n(?>(:?=ypart[^\n]+\n)?)(?>[^\r\n]{62,999}\r?\n){40}/mo;
}
Mike.
Technical Details
Message-ID:
<agbra2$bj8$1@ncc1701.cistron.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news2.cistron.nl!news.cistron.nl!not-for-mailReferences:
<ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu> <ag7dv1$ccm$1@ncc1701.cistron.net> <ag9ofv$8iq$1@wonderland.linux.it>Show Full Headers
Complete Article Headers
Message-ID: <agbra2$bj8$1@ncc1701.cistron.net> Subject: Re: innd perl filter slowdown ? Date: Mon, 08 Jul 2002 10:59:14 +0000 From: "Miquel van Smoorenburg" <miquels.at.cistron.nl.spamtrap@netscum.nl> References: <ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu> <ag7dv1$ccm$1@ncc1701.cistron.net> <ag9ofv$8iq$1@wonderland.linux.it> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!small.news.tele.dk!62.216.30.27!newsgate.cistron.nl!news2.cistron.nl!news.cistron.nl!not-for-mail Newsgroups: news.software.nntp Organization: Cistron Lines: 32 NNTP-Posting-Host: traveler.cistron-office.nl Content-Type: text/plain; charset=iso-8859-15 X-Trace: ncc1701.cistron.net 1026125954 11880 62.216.29.67 (8 Jul 2002 10:59:14 GMT) X-Complaints-To: abuse@cistron.nl NNTP-Posting-Date: Mon, 8 Jul 2002 10:59:14 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: miquels@cistron-office.nl (Miquel van Smoorenburg)