Use C extensions to inflate RawBSONDocument

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Performance
    • None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Currently, inflating (decoding to a dict) a RawBSONDocument only uses the C extensions to decode each element, with the dict-building loop running in pure Python. Calling from Python to C for every single element is significantly slower than calling into C once for the entire document. 

      Definition of Done

      • We should match the same parsing pattern for other BSON optimizations in C and make RawBSONDocument match

      Pitfalls

      • N/A

            Assignee:
            Noah Stapp
            Reporter:
            Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: