[GODRIVER-77] Append new object id's to inserted documents more efficiently Created: 11/Sep/17  Updated: 27/Oct/23  Resolved: 23/Feb/18

Status: Closed
Project: Go Driver
Component/s: Performance
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Samuel Rossi (Inactive) Assignee: David Golden
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.



 Comments   
Comment by David Golden [ 23/Feb/18 ]

Fixed via the change to the new BSON library.

Comment by David Golden [ 15/Sep/17 ]

Moving to "Blocked". This should be done after adding some raw BSON manipulation capabilities to the bson package.

Generated at Thu Feb 08 08:33:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.