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

Replace instances of new UTF8Encoding(false, true) with static singletons

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.10, 2.0
    • Affects Version/s: 1.9.2
    • Component/s: None
    • None
    • Fully Compatible

      Doing some memory profiling revealed a significant number of allocations of UTF8Encoding instances. While these eventually get garbage collected they take up a significant amount of space in the interim. It looks like the BsonTrie<TValue> class has already done this. I would recommend doing it across the board.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            joe.enzminger Joe Enzminger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: