Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: performance
    • Labels:
      None

      Description

      While digging through a profile I noticed that for every CacheMap.get(..) call where there is a hit, I was seeing two underlying ConcurrentHashMap.get method calls. This is because we always look to see if a given key exists in the pinned map before looking in the main map. As the code stands today, it is optimized for the existence of entries in the pinned map and I think that is an incorrect assumption.

      With this JIRA I'm going to optimize the get(...), containsKey(...), and containsValue(...) to check the main map for results before looking at the pinned map. In a micro benchmark I observed approximately a 20% improvement in the time required to call get(...) when there is a hit.

        Activity

        Rick Curtis created issue -
        Hide
        Rick Curtis added a comment -

        Committed revision 1031110 to trunk.

        Show
        Rick Curtis added a comment - Committed revision 1031110 to trunk.
        Rick Curtis made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Rick Curtis made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Rick Curtis
            Reporter:
            Rick Curtis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development