You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2014/05/14 14:07:14 UTC

[jira] [Commented] (HTTPCLIENT-1509) Increase DefaultHttpResponseParser buffer size

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

Oleg Kalnichevski commented on HTTPCLIENT-1509:
-----------------------------------------------

bq. DefaultHttpResponseParser allocates a CharArrayBuffer(128), which ends up resulting in a 128-byte InputStream read.

Are you absolutely sure about that? The lineBuf which is indeed allocated to be 128 bytes only in the beginning is used to read *individual header lines* from the session input buffer (not the underlying socket stream). See SessionInputBufferImpl. Not to mention that the line buffer can grow dynamically if needed.

Oleg 

> Increase DefaultHttpResponseParser buffer size
> ----------------------------------------------
>
>                 Key: HTTPCLIENT-1509
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1509
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>    Affects Versions: 4.3.3
>            Reporter: Chris Heald
>            Priority: Minor
>              Labels: performance
>
> DefaultHttpResponseParser allocates a CharArrayBuffer(128), which ends up resulting in a 128-byte InputStream read. Due to the typical size of an HTTP response's headers, this ends up doing tens of stream reads per document read.
> Increasing the size of this buffer to something more traditional like 4096 substantially improved the performance of HttpClient in my high-load reads.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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