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> >
--------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org