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

(fc) Avoiding AtomicBoolean in FileInput/-OutputStream improves startup

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b143
    • Verification:
      Not verified

      Description

      JDK-8025619 changed the implementation from a volatile boolean + lock to AtomicBoolean, which was rather benign up until when VarHandles was integrated, which means initializing AtomicBoolean now pulls in 20 VarHandle classes and does a non-trivial amount of initialization.

      Since we always create FileInput/-OutputStreams during system initialization (System.in/out/err), deferring initialization of AtomicBoolean appears worthwhile.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: