[CXX-1499] Don't access bson_iter_t internals Created: 23/Jan/18 Updated: 28/Oct/23 Resolved: 01/Aug/18 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.4.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Epic Link: | libbson iter api | ||||||||||||
| Description |
|
We current access the internals of the bson_iter_t structure (see Let's add a libbson function bson_iter_keylen which returns the length of the key. This is already known, it's something like "key - d1". The C++ iterator can store this length before destroying the bson_iter_t, then pass it back into a new libbson function like bson_iter_init_with_data. That will end up doing only one key-length calculation per iterator increment, whereas right now the C++ Driver does two. |
| Comments |
| Comment by Githook User [ 01/Aug/18 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@10gen.com', 'username': 'kevinAlbs'}Message: |