Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1132

Reuse buffer when deserializing subdocuments and subarrays

      The Deserialize implementation for RawDocumentBuf currently will allocate separate buffers for each subdocument and subarray recursively, appending them to their parent buffers on the way up as the stack frames pop off. This can hurt performance when dealing with lots of arrays and subdocuments. Instead, we should leverage the DeserializeSeed functionality in serde to reuse the top-level buffer for all subdocuments and subarrays, which should improve performance.

      Note: this only applies when deserializing RawDocumentBuf from human readable, non BSON formats.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: