Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-984

Improve use of bson_init_static

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc0
    • Component/s: BSON, Implementation
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Platforms 2016-08-26

      Description

      We call bson_init_static repeatedly and redundantly (e.g. on every element access).
      We should call bson_init_static once on view creation and cache the result.

      Update: we can't cache a bson_t because it uses internal references and it therefore non-copyable without dangling pointers. We've proposed CDRIVER-2064, which would allow us to construct bson_iter_t structures directly directly from the view buffer.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: