Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-346

A faster and more memory efficient pure python BSON module.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Python Sprint 6, Python Sprint 7

      Description

      The summary states the goal. PyMongo's pure python BSON module is slow. This hasn't historically been a huge problem since most users have taken advantage of _cbson to (dramatically) improve performance. The popularity of pypy and (to a much lesser extent) Jython means we have to provide better pure python performance.

      The primary issue is memory copies serializing to BSON and splitting strings decoding back to Python dicts. To solve these problems we will probably try a few different approaches using cStringIO/BytesIO and/or list comprehensions with generators. We will also investigate the newer buffer protocol but that isn't supported everywhere people want to use PyMongo.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: