Article View: news.software.nntp
Article #59513Re: innd perl filter slowdown ?
From: Marco d'Itri
Date: Sun, 07 Jul 2002 15:58
Date: Sun, 07 Jul 2002 15:58
32 lines
2332 bytes
2332 bytes
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 ?.
Anyway, since \s matches \r too I can just remove \r?, I will make a new
release in a couple of days.
I will audit the code for other regexes with this pattern.
>Also, the regexp from cleanfeed and Russ differ slightly in that
>a) cleanfeed: ^[ \t|>] Russ: ^[ \t>] (quoting, I suppose)
>b) cleanfeed: {60,61} Russ: {59,60}
>
>Which one is right? One of them appears to be off-by-one ?
I copied {60,61} from the original cleanfeed by Jeremy, maybe he can
explain. Please let me know if anybody thinks I should change this.
I'm not sure about where I picked up | as a quoting character, looks
like I added myself so this probably means I've found enough quoted
binaries on my old full feed server.
--
ciao, |
Marco | * The Internet is full. Go away. -- Joel Furr *
Technical Details
Message-ID:
<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.mailgate.org!newsfeeder.edisontel.com!area.cu.mi.it!kirk.uli.it!phobos.ibnetwork.net!bofh.it!wonderland.linux.it!not-for-mailReferences:
<ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu> <ag7dv1$ccm$1@ncc1701.cistron.net>Show Full Headers
Complete Article Headers
Message-ID: <ag9ofv$8iq$1@wonderland.linux.it>
Subject: Re: innd perl filter slowdown ?
Date: Sun, 07 Jul 2002 15:58:55 +0000
From: Marco d'Itri <abuse@1.2.0.1.0.0.1.e.f.f.3.ip6.int>
References: <ag3tc5$lcl$1@ncc1701.cistron.net> <yl65zunpyc.fsf@windlord.stanford.edu> <ag7dv1$ccm$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.mailgate.org!newsfeeder.edisontel.com!area.cu.mi.it!kirk.uli.it!phobos.ibnetwork.net!bofh.it!wonderland.linux.it!not-for-mail
Newsgroups: news.software.nntp
Organization: Italian Linux Society - http://www.linux.it
Lines: 31
NNTP-Posting-Host: wonderland.linux.it
X-Trace: wonderland.linux.it 1026057535 8794 10.0.0.1 (7 Jul 2002 15:58:55 GMT)
User-Agent: tin/1.5.13-20020703 ("Chop Suey!") (UNIX) (Linux/2.4.16 (i686))