• Type: Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.7.0
    • Affects Version/s: None
    • Component/s: None
    • 0
    • Not Needed
    • Not Needed
    • 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?

      Use Case

      As a... driver engineer
      I want... to remove extraneous calls to Buffer.subarray
      So that... the performance of bson and the driver will improve

      User Impact

      Increases performance for users

      Dependencies

      N/A

      Unknowns

      N/A

      Acceptance Criteria

      Implementation Requirements

      • Update ByteUtils.toUTF8 in src/utils/node_byte_utils.ts to take in start and end and pass them through to the call to toString rather than calling Buffer.subarray directly inside getValidatedString.
      • Update ByteUtils.UTF8 to not make a call to ByteUtils.toLocalBufferType
        • Address any typescript issues this causes

      Testing Requirements

      • Manually check that the performance results from making the aforementioned changes result in the expected performance increase seen in the results of the investigation for NODE-4283

      Documentation Requirements

      N/A

      Follow Up Requirements

      • Create ticket to add bson regression tests for this code path
      • Create ticket to further audit ByteUtils for other opportunities for performance gains

            Assignee:
            warren.james@mongodb.com Warren James
            Reporter:
            warren.james@mongodb.com Warren James
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: