Python Driver uses list.pop() unnecessarily

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • 2.3
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The Python driver calls list.pop() to consume data returned within a Cursor. This modifies the Python list, which is unnecessary. Attached is a version of Cursor.py that uses a pointer to keep track of the next element returned obviating list modification. This speeds up iteration over larger results by up to 20% in our applications. I have run the tests that ship with the Python driver with this modified Cursor successfully.

        1. llCursor.py
          26 kB
          Aaron Cordova

              Assignee:
              Ross Lawley
              Reporter:
              Aaron Cordova
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: