Cayenne
  1. Cayenne
  2. CAY-1680

Get rid of shared locks in DataDomain metadata lookups

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1M3
    • Fix Version/s: 3.1B1
    • Component/s: Core Library
    • Labels:
      None

      Description

      We can improve performance by using concurrent collections instead of synchronizing the HashMap. This includes:

      DataDomain.properties
      DataDomain.nodes
      DataDomain.nodesByDataMapName

      Also instead of reindexing on failed lookups, we can simply lazy-fill collection from a given DataMap

        Activity

        Hide
        Andrus Adamchik added a comment - - edited

        Some interesting data points on ConcurrentHashMap vs HashMap:

        http://www.informit.com/guides/content.aspx?g=java&seqNum=246
        http://gregluck.com/blog/archives/2009/06/performance-problems-in-concurrenthashmap-vs-synchronized-hashmap/

        These are showing the performance hits taken as a tradeoff for concurrency. Appears to be an issue with large maps only.

        Show
        Andrus Adamchik added a comment - - edited Some interesting data points on ConcurrentHashMap vs HashMap: http://www.informit.com/guides/content.aspx?g=java&seqNum=246 http://gregluck.com/blog/archives/2009/06/performance-problems-in-concurrenthashmap-vs-synchronized-hashmap/ These are showing the performance hits taken as a tradeoff for concurrency. Appears to be an issue with large maps only.

          People

          • Assignee:
            Andrus Adamchik
            Reporter:
            Andrus Adamchik
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development