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

Reduce time blocking the ClassSpecializer cache creating SpeciesData

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 11
    • None
    • core-libs
    • None

    Description

      ClassSpecializer.findSpecies uses computeIfAbsent to create an instance of and then load and link a SpeciesData class. The loading and linking might be a non-trivial operation, which means the ConcurrentHashMap used as a SpeciesData cache in ClassSpecializer could be partially blocked for longer than necessary. It also prohibits the loading/linking operation from relying on another species, since that would lead to a recursive update of the CHM from the same thread.

      The instantiation of SpeciesData and the initialization thereof (if needed) should be split out so that the latter takes place after the computeIfAbsent.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: