[CSHARP-2692] Performance: Reduce byte buffer allocations during deserialization Created: 15/Aug/19  Updated: 28/Oct/23  Resolved: 01/Mar/21

Status: Closed
Project: C# Driver
Component/s: Performance, Serialization
Affects Version/s: 2.8.1, 2.9.0
Fix Version/s: 2.12.0

Type: Improvement Priority: Major - P3
Reporter: Daniel Hegener Assignee: Boris Dogadov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2019-08-15-09-26-18-570.png     JPEG File mem1.JPG    

 Description   

The profiler says:

The Utf8Encoding type provides and overload for the GetBytes method which can be leveraged to avoid those not needed allocations,



 Comments   
Comment by Githook User [ 01/Mar/21 ]

Author:

{'name': 'Boris', 'email': 'boris.dogadov@mongodb.com', 'username': 'BorisDog'}

Message: CSHARP-2693/CSHARP-2692: Encoding.GetBytes buffer caching optimization
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/f0bece570fdd3c8ede73981adaa89a225caa978c

Generated at Wed Feb 07 21:43:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.