Bill Moseley wrote:
real 0m0.048s user 0m0.015s sys 0m0.036s
But Maybe I'm not using time correctly. Let's see...
[EMAIL PROTECTED]:/home/stas/apache.org/modperl-docs >time find src -name '*.pod' | xargs fgrep '$|' | sleep 5
real 0m5.009s user 0m0.033s sys 0m0.012s
Looks like it's counting total time.
Benchmark.pm?
Also remember that user doesn't care about CPU clocks, but elapsed wallclock.
That's "real" time above. Again, how many searches a second are you expecting? We aren't running google loads here. ;)
Not many, but don't forget that apache.org every so often goes overloaded. We don't have the whole machine dedicated to perl.apache.org.
I guess so, but from what I know, Parse::RecDescent is not good for real-time processing because it's very slow. Rememember that it stores the parsed tree using Perl datastructures, which is very ineffective. I don't know if it was rewritten to use C datastructures since last year.Could we feed the pod source into Parse::RecDescent and get it to tokenize perl code? That would be more fun.
My idea was not for parsing while searching, rather parsing while indexing. The parsing of a tiny query wouldn't take long. But I was also kind of joking, but it would be interesting, too.
interesting, but not practical for real-time search. But as you said it's fine for pre-parsing.
I'm not sure what to parse into. Should $x++ get parsed into "$x", "$x++",
or "$x and ++"?
I don't know.
Do a normal indexed search for most, but offer an option to search for perl code and then use fgrep.
OK, so how hard would be to have a simple prototype to play with?
_____________________________________________________________________ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
