hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Why non-buffered InputStream in HttpClient / HttpParser?
Date Thu, 03 Jul 2003 14:44:26 GMT
> 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.


View raw message