Append new object id's to inserted documents more efficiently

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Samuel Rossi (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: