hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: [HttpCommon] Classic IO code refactored
Date Fri, 02 Sep 2005 22:20:14 GMT
Hi Mike,

NIO code can still be optimized. However, I seriously doubt it would
ever outperform classic IO to an extent significant enough to justify
the absence of timeout support. NIO  increasingly appears useless
outside HttpAsync where it can be used in the non-blocking mode. I
suggest all NIO code be eventually removed from HttpCommon and put in
HttpAsync

Oleg

On Fri, 2005-09-02 at 18:01 -0400, Michael Becke wrote:
> My results are similar.
> 
> Old IO byte array read average time (ms): 844
> NIO byte array read average time (ms): 875
> Old IO one byte read average time (ms): 156
> NIO one byte read average time (ms): 234
> Old IO one line read average time (ms): 156
> NIO one line read average time (ms): 203
> 
> I don't see anything strang with the NIO code, it just feels like
> there must be something wrong.  Perhaps that's why Sun chose NIO
> instead of something else like FastIO :)
> 
> Mike
> 
> On 9/2/05, Oleg Kalnichevski <olegk@apache.org> wrote:
> > Folks,
> > 
> > I have completely refactored the HTTP data receiver and transmitter
> > classes based on the classic IO. As incredible as it may sound this
> > resulted in almost four-fold performance improvement on one byte and
> > line read operations. Now classic IO completely decimates NIO on my
> > Linux box
> > 
> > Before refactoring
> > =================
> > Old IO byte array read average time (ms): 208
> > NIO byte array read average time (ms): 212
> > Old IO one byte read average time (ms): 642
> > NIO one byte read average time (ms): 176
> > Old IO one line read average time (ms): 819
> > NIO one line read average time (ms): 326
> > 
> > After refactoring
> > =================
> > Old IO byte array read average time (ms): 193
> > NIO byte array read average time (ms): 209
> > Old IO one byte read average time (ms): 107
> > NIO one byte read average time (ms): 173
> > Old IO one line read average time (ms): 164
> > NIO one line read average time (ms): 328
> > 
> > Source:
> > http://svn.apache.org/repos/asf/jakarta/httpclient/trunk/http-common/src/test/tests/performance/HttpNIOvsHttpOIOTest.java
> > 
> > In my opinion there's no longer a single reason to keep NIO in the
> > HttpCommon package
> > 
> > Oleg
> > PS: I'll be on vacation from tomorrow until next Saturday, Sept 10th.
> > Talk to you in a week
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> 
> 


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


Mime
View raw message