Re: Spinning httpd
At 10:28 12/10/2000 -0700, Bill Moseley wrote: >I have a spinning mod_perl process. I installed a > $SIG{USR2} = \&Carp::confess; >handler and it pointed to this line: > $cnt++ while $query->{query} =~ /(?:^|\s)[("]*\S$size\*/g; I have no idea why your httpd is spinning, however without taking into account all that your regexp does, wouldn't an adaptation of the following work as well (thus avoiding the regex causes spinning problem) : $cnt = scalar grep /\*/, split(/\s+/, $query->{query}); hth -- robin b. Smoking is one of the leading causes of statistics.
Re: Spinning httpd
At 07:45 PM 10/12/00 +0200, Robin Berjon wrote: >At 10:28 12/10/2000 -0700, Bill Moseley wrote: >>I have a spinning mod_perl process. I installed a >> $SIG{USR2} = \&Carp::confess; >>handler and it pointed to this line: >> $cnt++ while $query->{query} =~ /(?:^|\s)[("]*\S$size\*/g; > >I have no idea why your httpd is spinning, however without taking into >account all that your regexp does, wouldn't an adaptation of the following >work as well (thus avoiding the regex causes spinning problem) : > >$cnt = scalar grep /\*/, split(/\s+/, $query->{query}); Oh, sorry. I'm trying to count up how many words that end in "*" there are, but grouped by number of letters before the "*". query = 'a* and "b* aa*" or (bbb* or foo)' So there are two single char wilds, one double char, and one three letter wild. I'll try using split instead because it's probably the /g that's causing the problem. Thanks, Bill Moseley mailto:[EMAIL PROTECTED]
Re: Spinning httpd
On Thu, 12 Oct 2000, Bill Moseley wrote: > I'm in need of some ideas! > > I have a spinning mod_perl process. I installed a > > $SIG{USR2} = \&Carp::confess; > > handler and it pointed to this line: > >$cnt++ while $query->{query} =~ /(?:^|\s)[("]*\S$size\*/g; Try: $cnt++ while $query->{query} =~ /\G(?:^|\s)[("]*\S$size\*/gc; -- /||** Director and CTO ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\