-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: BSON, Performance
-
None
Currently, we frequently need to make copies of BSON data, because we have no way to return a document::value that owns the document, but has a view into a sub-document. If we did, we could do better in situations like this:
Here, we have a complete BSON result, but we want to return a document::value that is only a sub-section of the document, for a given field. Since right now you can't have a document::value that owns the whole bson document, but views only a subset, we have no choice but to copy the relevant subset to a new document.