Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215412

Optimize PrintStream.println methods

XMLWordPrintable

    • b03

      The various PrintStream.println methods are inefficient: nested synchronization, multiple flushes and a scan of the input string for newlines that in the end is pointless since newLine will always flush if autoflush is enabled.

      While performance of printing to console or file is likely to be dominated by the OS and I/O overheads, there are plenty of simple text processing applications using stdout to pipe output to another process for which performance of println could definitely matter.

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: