[logback-user] logback console appender slow on windows xp

Peter Kullmann p.kullmann at arenae.ch
Thu Dec 22 15:52:56 CET 2011


I tested the same snippet with log4j and it runs fast with javaw on windows xp (700ms).
The versions were log4j 1.2.15; org.slf4j.api 1.15.11 and org.slf4j.log4j12 1.4.2

The slow configuration was:
org.slf4j.api 1.15.11 and org.slf4j.log4j12 1.4.2
ch.qos.logback.classic, ch.qos.logback.core, ch.qos.logback.slf4j all in version 0.9.19.

Peter


Am 21.12.2011 um 17:53 schrieb ceki:

> Thank you for the output of visualvm profiler. It looks like 90.4% of the time is spent in java.io.PrintStream.write(int) called by ch.qos.logback.core.joran.spi.ConsoleTarget. There is also some time spent in java.io.IOException.<init>(String), i.e the constructor of IOException.
> 
> In principle, the performance of log4j ConsoleAppender should be very similar, although its execution path might be slightly shorter.
> 
> Which version of log4j are you using?
> 
> -- 
> Ceki
> http://twitter.com/#!/ceki
> 
> On 21.12.2011 16:04, Peter Kullmann wrote:
>> I don't know what to do except perhaps warn against the usage of the console appender when running without a console on windows xp.
>> 
>> I'm attaching the output of the visualvm profiler so that you can see where all the time is being spent.
>> 
>> By the way, I think log4j doesn't have this problem. We were using log4j for years in much the same setups.
>> 
>> Peter
>> 
>> 
>> Am 21.12.2011 um 11:03 schrieb ceki:
>> 
>>> On 21.12.2011 10:55, Peter Kullmann wrote:
>>>> Hi Ceki,
>>>> 
>>>> The problem manifests itself under windows xp. Windows 7 is much better.
>>> 
>>> I don't see anything actionable to work with here. Ideas?
>>> 
>>>> Peter
>>> 
> 
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
> 



More information about the Logback-user mailing list