logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: Garbage-free Log4j docs preview
Date Wed, 25 May 2016 14:09:48 GMT


On Wednesday, May 25, 2016 at 3:02:33 AM UTC+9, Richard Warburton wrote:
>
> Hi,
>
> Could we avoid that by using FileDescriptor.out / FileDescriptor.err 
>> instead of System.out / System.err ?
>>
>> On Tue, May 24, 2016 at 4:09 PM, Matt Sicker <boa...@gmail.com 
>> <javascript:>> wrote:
>>
>>> All the PrintStream.write() methods have locks.
>>>
>>> On 24 May 2016 at 02:56, Mikael Ståldal <mikael....@magine.com 
>>> <javascript:>> wrote:
>>>
>>>> Do we know why Console has so bad performance (compared to File)? Is 
>>>> this true also if you redirect STDOUT to a file?
>>>>
>>>
> There's a couple of other things to consider:
>
>  * Console writes in Java flush on every newline.
>  * The terminal that is being written to might also spend time rendering 
> text, if your benchmark actually writes STDOUT. I've seen terminals eat 3x 
> more CPU rendering logs than a program was using to produce them.
>
Is rendering the bottleneck? I'm just wondering what causes this. The 50x 
difference with writing to a file is staggering... (I haven't benchmark 
File I/O when flushing on every write, may be interesting to try.)


> regards,
>
>   Richard Warburton
>
>   http://insightfullogic.com
>   @RichardWarburto <http://twitter.com/richardwarburto>
>

Mime
View raw message