Reduce allocations in bsonrw.valueReader and bsoncodec.MapCodec

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Gone away
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Matt Dale
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: