-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Performance
As of RUST-187, insert_many performs batching by calculating the size of the prospective command documents and then splits up the batches if they would be too large. This requires that the size of the documents be calculated via traversal, which may not be the most efficient way to perform batching. We should look into more efficient ways to calculate the size of BSON, including performing the calculation as the BSON is encoded into bytes.