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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
