On Mon, 2010-07-19 at 10:22 -0400, Brooks, Kenneth S wrote: > ...
> > > What in the world am I missing? > > Is that just to be expected.. or am I doing something wrong? > > > > What further information do you need from me? > > A context log of the HTTP session would be most useful. > > [[-KenBrooks-]] Ok.. I'll turn the logging back on (I had it turned off > because previously I was running httpclient trace and that in itself was > obviously a huge performance hit..) :) > There is no need to turn on full wire logging, which is very noisy and expensive. Only context logging should be enough. http://hc.apache.org/httpcomponents-client-4.0.1/logging.html ... > > If the transport you are developing does not require authentication, > HTTP state management and complex connection pooling, one possibility to > speed things up by approximately 40-50% would be using HttpCore directly > without all those additional services provided by HttpClient > > [[-KenBrooks-]] Very interesting thought.. No we don't need any > authentication or http state management, cookies (which I disabled by > removing the cookie interceptors) > The only things that we really need that I can think of are the > * stale check > * idleconnectionmanagerthread (which is my class) but as long as the > ConnectionManager it uses is in httpcore then we might be good. > * socket timeout > * connection timeout > * tcp nodelay > > I think a good many of those (at least the bottom 3) are all underlying > protocol settings so are probably in core.. not sure about stale check and > the connectionmanager. > > Are there interceptors (like the cookie interceptors) that I can disable for > authentication & state management? > That would at least be a good test that circumventing client and going to > core might make a difference. > Most of the overhead is added by DefaultRequestDirector which cannot be easily removed. One possibility would be to use a simplified custom implementation of RequestDirector to execute requests with minimal overhead, but this would be hardly any different than using HttpCore directly. Here's a simple benchmark which can be used to compare performance of HttpCore and HttpClient http://wiki.apache.org/HttpComponents/HttpClient3vsHttpClient4vsHttpCore Hope this help Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
