[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12842423#action_12842423
 ] 

Oleksandr Alesinskyy commented on HTTPCLIENT-925:
-------------------------------------------------

It is a part of the equation - but not all of it. Namely, after changing of the 
user agent in the 4.0.1 benchmark

        DefaultHttpClient httpclient = new DefaultHttpClient(params);
        // Reset user agent to the 3.1 value
        HttpProtocolParams.setUserAgent(params, 
                "Jakarta Commons-HttpClient");

Response sizes become (almost) identical but the performance difference 
persists (tests have been executed  practically at the same time):

*3.1*
Server Software:        gws

Document URI:           http://www.google.com
Document Length:        6861 bytes

Time taken for tests:   9.711 seconds
Complete requests:      100
Failed requests:        0
Content transferred:    686462 bytes
Requests per second:    10.2976 [#/sec] (mean)
Time per request:       97.11 [ms] (mean)

*4.0.1*
Server Software:        gws

Document URI:           http://www.google.com
Document Length:        6865 bytes

Time taken for tests:   34.789 seconds
Complete requests:      100
Failed requests:        0
Content transferred:    686482 bytes
Requests per second:    2.8744717 [#/sec] (mean)
Time per request:       347.89 [ms] (mean)

*run.bat*

for /L %%i in (1,1,10) do (
  java -cp .;* org/apache/http/client/benchmark/TestHttpClient4 
http://www.google.com 100 2>&1 1>>4_
  java -cp .;* org/apache/http/client/benchmark/TestHttpClient3 
http://www.google.com 100 2>&1 1>>3_
)


> HttpClient 4.0.1 is approx. 3 time slower then older 3.1 when works against 
> www.google.com
> ------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-925
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-925
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>            Reporter: Oleksandr Alesinskyy
>            Priority: Minor
>         Attachments: google.zip
>
>
> I have tried  benchmarks from httpclient-benchmark - results are some what 
> funny - while for most tried sites 4.0.1 is marginally faster then 3.1, for a 
> couple of sites it is significantly slower, the most noticeable for 
> www.google.com, test were repeated multiple times, here are sample output 
> from 4.0.1 and 3..1  
> *4.0.1*
> Server Software:      gws
> Document URI:         http://www.google.com
> Document Length:      8459 bytes
> Time taken for tests: 3.952 seconds
> Complete requests:    10
> Failed requests:      0
> Content transferred:  84524 bytes
> Requests per second:  2.5303645 [#/sec] (mean)
> Time per request:     395.2 [ms] (mean)
> *3.1*
> Server Software:      gws
> Document URI:         http://www.google.com
> Document Length:      6847 bytes
> Time taken for tests: 1.354 seconds
> Complete requests:    10
> Failed requests:      0
> Content transferred:  68488 bytes
> Requests per second:  7.3855247 [#/sec] (mean)
> Time per request:     135.4 [ms] (mean)
> It is interesting, why.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to