Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2450

Performance: Reduced lock contention in BsonSerializer.LookupActualType

      Performance profiling in our multithreaded environment seems to indicate that BsonSerializer.LookupActualType is on the hot path during deserialization. This is caused by the current reader-writer lock implementation. There is, however, an opportunity to reduce lock contention using a non-generic Hashtable which is safe for concurrent reads as per https://docs.microsoft.com/en-us/dotnet/api/system.collections.hashtable?redirectedfrom=MSDN&view=netframework-4.7.2#thread-safety.

            Assignee:
            james.kovacs@mongodb.com James Kovacs
            Reporter:
            daniel.hegener@gmx.net Daniel Hegener
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: