[SERVER-72102] Calculate BSON size of a document without serialization Created: 14/Dec/22  Updated: 28/Feb/23  Resolved: 28/Feb/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Romans Kasperovics Assignee: Romans Kasperovics
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-74455 Complete TODO listed in SERVER-72102 Closed
Participants:

 Description   

With serialization it can be done by calling doc.toBson().objsize(). However, serialization is somehwhat slow (ca. 1ms for a 16MB document), as it requires memory allocation.


Generated at Thu Feb 08 06:20:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.