Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2026

Reduce allocations in bsonrw.valueReader and bsoncodec.MapCodec

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • None

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: