Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5907

Use BSON serialization in BulkWrite to calculate size and store bytes for operation

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: BSON, Performance
    • 0
    • Not Needed

      Use Case

      As a Node.js driver user
      I want the driver to perform less work to formulate a bulkWrite operation
      So that javascript spends less time preprocessing data

      User Impact

      • Faster insertMany

      Dependencies

      • NODE-4063
        • The bulk shim class 1) removes extra server selections, 2) makes it easier to plumb this change to lower layers of the driver

      Unknowns

      • How can we reuse already serialized BSON?

      Acceptance Criteria

      Implementation Requirements

      • Instead of using BSON.calculateObjectSize, use BSON.serialize and preserve that work to be used in command construction

      Testing Requirements

      • unit test, spec test sync, etc

      Documentation Requirements

      • DOCSP ticket, API docs, etc

      Follow Up Requirements

      • additional tickets to file, required releases, etc

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: