hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Lorenz <oliver.lor...@scientificgames.se>
Subject responseEntity.writeTo() performance depending on network?
Date Tue, 05 Feb 2013 07:43:31 GMT

We are using httpcore 4.0.1 and httpclient 4.0.3 in one of our products. In
a clients test environment, we experience a big delay when calling

This is the code:

                httpClient = new DefaultHttpClient();
                HttpResponse httpResponse= httpClient.execute(post);
                log.debug("response code:" +

                HttpEntity responseEntity = httpResponse.getEntity();
                log.debug("got Entity");
                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                log.debug("wrote everything to a stream.");
>From the log:

11:37:26,972 [router#12] DEBUG TERMINAL.SERVICE.CONNECTOR.LRTCS - response
11:37:26,972 [router#12] DEBUG TERMINAL.SERVICE.CONNECTOR.LRTCS - got Entity
11:38:49,092 [router#12] DEBUG TERMINAL.SERVICE.CONNECTOR.LRTCS - wrote
everything to a stream.

The call writeTo() on the responseEntity took more than 80 sek, for a
message of 560 kb.

The strange thing is that I cannot reproduce their problem, with identical
HW, in another network, even if I increase the message size to well above 3
MB. No other threads, garbage collection or other activities occur on the

As far as i understood the execute(), it blocks until the whole stream is
read from the socket. Is that not the case? Can the performance of writeTo()
be in some way depending on the network? Not sure if it makes a difference,
but the instance of httpResponse.getEntity() in my case is a

Thanks in advance!

View this message in context: http://httpcomponents.10934.n7.nabble.com/responseEntity-writeTo-performance-depending-on-network-tp19194.html
Sent from the HttpClient-User mailing list archive at Nabble.com.

To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message