Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2269

Provide internal iterator implementation for BSON iterator class

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.17.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      The MongoDB\BSON\Iterator class implements PHP's Iterator interface, however this adds a lot of overhead when iterating through elements. PHP's zend_class_entry struct supports providing a get_iterator function which seems to allow for a faster iteration of objects.

      If this speeds up iteration, we should consider adding the same logic to The MongoDB\Cursor class, which may suffer from the same performance overhead.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: