[GODRIVER-1683] Add a reflection-free opt-in bson.D encoder Created: 10/Jul/20 Updated: 28/Oct/23 Resolved: 27/Jul/20 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Divjot Arora (Inactive) | Assignee: | Divjot Arora (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Epic Link: | GODRIVER-1587 | ||||
| Description |
|
The existing codepath for marshalling a bson.D requires looking up registry entries for each element. We can optimize away these registry lookups by adding an opt-in encoder that treats bson.D as a closed type system and only marshals a small set of types (e.g. basic scalar types + the ones in the primitive package) and errors for others (e.g. if one of the document values is a struct). This encoder should live in x/bsonx and should not be registered by default. |
| Comments |
| Comment by Githook User [ 27/Jul/20 ] |
|
Author: {'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}Message: |
| Comment by Divjot Arora (Inactive) [ 22/Jul/20 ] |