You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2004/07/29 17:48:24 UTC

DO NOT REPLY [Bug 30388] New: - Performance Increase by setting the initial ByteArrayOS length

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=30388>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30388

Performance Increase by setting the initial ByteArrayOS length

           Summary: Performance Increase by setting the initial ByteArrayOS
                    length
           Product: Commons
           Version: 2.1 Final
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-httpclient-dev@jakarta.apache.org
        ReportedBy: ghexsel@uol.com.br


I've gotten quite an impressive performance boost when collecting the whole page
(HttpMethodBase.getResponseBodyAsString()) by setting the initial
ByteArrayOutputStream lenght to 4K.  

The optimal solution would be to set it to the size of the page, but that
parameter was not available on that method.

If 4K seem too much, that could be made a mutable parameter.

In my application, the gains were about 300-400%, and HttpClient is only part of
the application.

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