Calculate BSON size of a document without serialization

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Romans Kasperovics
            Reporter:
            Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: