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

Make Nashorn Timing class both threadsafe and efficient

    XMLWordPrintable

Details

    • b80
    • generic
    • generic

    Backports

      Description

        Timing.java in Nashorn currently uses a LinkedHashMap<String, Long> to record compilation timings. This is grossly inefficient (not to mention not being thread safe). The solution is to switch to using a ConcurrentHashMap<String, LongAdder> instead; with a separate LinkedBlockingQueue<String> to preserve ordering of stats.

        Attachments

          Issue Links

            Activity

              People

                attila Attila Szegedi
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: