You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Send a raw `insert` command rather than InsertMany. This prevents the driver from “sneakily” ensuring that each inserted document has an `_id`. (This also requires making TolerateSimpleDuplicateKeyInBulk smarter.)
- Avoid bson.Marshal() and bson.Unmarshal in hot paths. Even when the struct implements the Marshaler & Unmarshaler interfaces, the driver still does some extra work that, while not as problematic as reflection, is still better avoided.
- Avoid reallocations when marshaling recheck structs.
0 commit comments