-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.0.0
-
Component/s: Codecs, Performance
-
None
Currently, this method creates two copies of the BSON byte array, one in a BasicOutputBuffer, and a second in an UnsafeByteArrayOutputStream. Since this method owns the BasicOutputBuffer instance, we could safely take the byte array (along with an offset and length) directly from the BasicOutputBuffer and transfer ownership to the RawBsonDocument.