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

Append new object id's to inserted documents more efficiently

    • Type: Icon: Improvement Improvement
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • None

      Documents that the user inserts into the database are passed to the driver as `interface{}` types. This makes it tricky to detect if the `_id` field is already present (and to add it if necessary. Currently, we do this by marshalling the document into a byte slice and then unmarshalling that into a bson.M. This is inefficient, and it doesn't preserve order. We should implement a way to do this directly with a byte slice to avoid having to unmarshal into a bson.M.

            Assignee:
            david.golden@mongodb.com David Golden
            Reporter:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: