Provide internal iterator implementation for BSON iterator class

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 1.17.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: