[GODRIVER-2026] Reduce allocations in bsonrw.valueReader and bsoncodec.MapCodec Created: 26/May/21  Updated: 19/Sep/22

Status: Backlog
Project: Go Driver
Component/s: Performance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Matt Dale Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File memprofile-unmarshal-bson.out    
Issue Links:
Related
related to GODRIVER-1670 Use buffer pooling and copying return... Closed
Quarter: FY23Q2, FY23Q3

 Description   

In the attached memory profile of unmarshalling BSON, the bsonrw.valueReader#advanceFrame and bsoncodec.MapCodec#decodeKey methods make up about 25% of total allocations when decoding benchmark BSON documents, which seems unusually high. The exact source of the allocations is unclear, it requires more investigation. See the attached memory profile.

memprofile-unmarshal-bson.out


Generated at Thu Feb 08 08:37:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.