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

Reduce allocations in bsonrw.valueReader and bsoncodec.MapCodec

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • Performance
    • None

    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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: