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

Use less memory without scope capturing

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.25.0
    • Affects Version/s: 2.7.2
    • Component/s: Json, Performance
    • Labels:
      None
    • Environment:
      Any, its about C# driver doing same, but faster :)
    • Fully Compatible
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      JsonWriter.EscapedString implementation uses anonymous function that touches instance private method - forces compiler to capture scope with 'this' for each =\

      We can switch from .All LINQ to hand written method to avoid object allocation each time method called (super-often).

      Thanks.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            nik Nikolay Mitikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: