[CSHARP-4028] Performance: Too many lambda closure allocations in JsonWriter.EscapedString Created: 31/Jan/22 Updated: 28/Oct/23 Resolved: 02/Feb/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Json, Performance |
| Affects Version/s: | 2.14.0 |
| Fix Version/s: | 2.15.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Daniel Hegener | Assignee: | Robert Stam |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Performance | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Quarter: | FY22Q1 |
| Backwards Compatibility: | Fully Compatible |
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 02/Feb/22 ] |
|
Author: {'name': 'Daniel Hegener', 'email': 'daniel.hegener@fisglobal.com'}Message: |
| Comment by Robert Stam [ 01/Feb/22 ] |
|
Thank you for creating this ticket and for submitting a PR for it. We will review it soon. |
| Comment by Daniel Hegener [ 31/Jan/22 ] |