hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Log creation appears to be a slowdown
Date Mon, 30 Nov 2009 13:27:18 GMT
On Sat, 2009-11-28 at 17:01 +0000, Tony Poppleton wrote:
> Hi,
> 
> I have run a JProfiler on my application that uses HttpClient to send 
> requests every 10 milliseconds.  One interesting part of the results is 
> that the Log creation is actually consuming about 5% of the time, which 
> is significant considering I am trying to squeeze the most performance 
> out.  For example:
> 
>     public class ClientParamsStack extends AbstractHttpParams {
>         private final Log log = LogFactory.getLog(getClass());
> 
> I have always used static loggers myself, which avoid this problem, so I 
> did a tiny bit of research 
> (http://wiki.apache.org/jakarta-commons/Logging/StaticLog) and 
> apparently static isn't always the right choice.
> 
>
> Is there anything I can do to prevent the log creation from being a 
> slowdown, short of checking out the source tree and creating my own 
> custom patch?
> 
> I haven't investigated fully yet, but ClientParamsStack class seems to 
> be the main culprit, so is there any way I can set it to use my own 
> custom implementation of this?
> 

Tony,

If log creation does indeed have such an adverse effect on performance,
I would very much rather prefer to fix the problem in the library
itself. If you are reasonably sure performance can be improved by
eliminating certain log instances, please remove them and submit a patch
for inclusion into the official code base.

Cheers

Oleg  


> Many thanks,
> Tony
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 



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


Mime
View raw message