hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Bigbee <abig...@mitre.org>
Subject Re: Why non-buffered InputStream in HttpClient / HttpParser?
Date Thu, 03 Jul 2003 16:04:02 GMT
On Thursday, July 3, 2003, at 10:44 AM, Michael Becke wrote:

>> I'm wondering:   *if* the HttpParser.readLine method (and subsequent 
>> calls to .readRawLine) is called much more frequently than other 
>> methods/classes that tap into InputStream, perhaps a start would be 
>> to modify the code in .readRawLine to use a BufferedReader+ 
>> BufferedInputStream.  That might yield some significant gains for 
>> small effort.  I'm just speculating here.
> Yes, this is where HttpClient does most (if not all) of its reading. 
> The problem with adding buffering at this level is that content data 
> will also be buffered.  Once buffered this data would be lost to code 
> not using the same instance of the BufferedInputStream.  If we want 
> buffering I think we will have to implement it at the HttpConnection 
> level or just leave it to the user for content data.
Thanks for the explanation.  I'm hoping for a good buffering solution 
by 2.1 or 3.


View raw message