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

Make Nashorn Timing class both threadsafe and efficient

XMLWordPrintable

    • b80
    • generic
    • generic

        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.

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

                Created:
                Updated:
                Resolved: