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

Performance: Too many lambda closure allocations in JsonWriter.EscapedString

    • Fully Compatible

      Some lambda closure related allocation topic has popped up in my most recent perf. profiling:

      The fix for this appears to be a complete no-brainer: Make the NeedsEscaping method static. I will create a PR for this. There's additional algorithmic improvement opportunities here but I am not sure they're worth looking into at this stage. Will keep on profiling.

        1. image-2022-01-31-22-55-01-398.png
          image-2022-01-31-22-55-01-398.png
          21 kB
        2. image-2022-01-31-22-52-21-374.png
          image-2022-01-31-22-52-21-374.png
          15 kB
        3. image-2022-01-31-22-51-48-450.png
          image-2022-01-31-22-51-48-450.png
          105 kB

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            daniel.hegener@gmx.net Daniel Hegener
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: