Documents store a backing BSON object in addition to a cache of fields which have already been examined. This means they may be ~2x the size of the actual user document they represent. This makes copying them slower (we call getOwned() when crossing the find/agg membrane), and increases memory consumption. We should make an effort to drop this backing BSON when it is no longer necessary to hold onto.
If this ticket gets scheduled, someone should think very hard about what conditions the backing BSON can be dropped are. I would start with the following:
1) The backing BSON has been fully traversed (DocumentStorage::_bsonIt has reached the end)
2) The metadata has been loaded from the backing BSON or the backing BSON has no metadata
3) The original BSON will not be returned to the user. i.e. the Document has been modified, will be modified, or will be discarded. If this is the case then we'll never take the toBson() fast path which uses the original backing BSON.
Point (3) is pretty broad, but for a first implementation we could only consider cases where the Document is already modified.