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

Optimize PrintStream.println methods

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 13
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b03

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: