Thank you, Oleg.
I agree with you, but for now, what I am doing is not kind of performance 
testing. As you can see, in the test code, I am really using only one thread to 
write http response time sequentially to the file system. And http4.x and 
http3.x tests code are using the same way to write to the system.
And the difference of the response time between the two are obvious.

Anyway, let me refine it using log4j. But i would predict that this won't help 
make the problem gone. 






bit1...@163.com
 
From: Oleg Kalnichevski
Date: 2015-07-08 16:52
To: HttpClient User Discussion; bit1...@163.com; httpclient-users
Subject: Re: Re: httpclient4 is extremely slow than correpsoning code of 
HttpClient3
On July 8, 2015 10:12:44 AM GMT+02:00, "bit1...@163.com" <bit1...@163.com> 
wrote:
>Thanks Stefan and Oleg.
>1. I refined the code to use single CloseableHttpClient object in
>HttpClientManager class,  but unfortunately, the problem is still
>there. Some sample out is as follows:
>2. As with the log in the test, it would be helpful to use log4j. 
>Since it doesn't affect the response time of requests, so I will leave
>it there as it is for now.
>
>
>As you can see, there are 7 seconds, 10 seconds request there. I never
>have this with HttpClientUtil#get. If I don't set the pool connection
>manager to the CloseableHttpClient , then the response time will make
>sense.
>
What you do is enormously silly. Your test code writes stuff to the file system 
and you want to use it as a benchmark for performance of http transport?
 
In out tests HttpClient 4.x is comfortably faster (~30%) than HttpClient 3.x or 
any other http client I tested against.
 
Oleg
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
 
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org
 

Reply via email to