ClassMap synchronization is a major source of contention

XMLWordPrintableJSON

    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Synchronization in the ClassMap class is the number one performance issue in our performance tests - specifically, in BSON.applyDecodingHooks(Object)

      The problem is that this lock is acquired repeatedly by any thread that is decoding elements, leading to a comb pattern of acquisitions and almost certainly not only guaranteeing contention but a moiré pattern of it leading to heavy switching overhead.

      A better strategy would be a CopyOnWriteMap. We have an Apache licensed CopyOnWriteMap impl if required.

              Assignee:
              Brendan W. McAdams (Inactive)
              Reporter:
              Jed Wesley-Smith
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: