httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Grundman <a...@hybridized.org>
Subject Re: Parsing error when parsing the second time
Date Tue, 01 May 2007 17:09:18 GMT

On Apr 30, 2007, at 6:57 PM, Joe Schaefer wrote:

> Joe Schaefer <joe+gmane@sunstarsys.com> writes:
>
>> Andy Grundman <andy@hybridized.org> writes:
>>
>>> I'm working on trying to improve the performance of Catalyst's  
>>> body parsing.
>>> We're currently using the all-Perl HTTP::Body, and it  actually  
>>> beats
>>> APR::Request for urlencoded data.  The regexes are  pretty  
>>> simple, so this
>>> isn't too surprising.
>>
>> I just ran a few microbenchmarks comparing apreq's urldecoding  
>> parser to
>> HTTP::Body, and apreq came out about 10x faster.  How are you getting
>> your results?
>
> The test script is I used is here (requires svn trunk):
>
>    http://people.apache.org/~joes/testing_apreq2_vs_http_body.pl
>
> when I run it with an arg of 10000, here's what it produced:
>
> Benchmark: timing 10000 iterations of apreq_args, apreq_body,  
> http_body...
> apreq_args:  2 wallclock secs ( 1.89 usr +  0.00 sys =  1.89 CPU) @  
> 5291.01/s (n=10000)
> apreq_body:  4 wallclock secs ( 3.81 usr +  0.00 sys =  3.81 CPU) @  
> 2624.67/s (n=10000)
>  http_body: 70 wallclock secs (69.84 usr +  0.00 sys = 69.84 CPU) @  
> 143.18/s (n=10000)
>
> I'm guessing you benchmarked by throwing lots of requests at a
> webserver, in which case you probably hit a bottleneck somewhere
> unrelated to the actual parsing.

Thanks Joe, I was using a simple benchmark script but may have been  
using the wrong apreq method or something.  I'll give your script a try.

-Andy

Mime
View raw message