Details
-
Improvement
-
Status: Closed
-
Minor - P4
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.
Attachments
Issue Links
- is duplicated by
-
PYTHON-330 Tiny optimization in find()
-
- Closed
-