Delegate .toArray() to the driver if possible

XMLWordPrintableJSON

    • Not Needed
    • Developer Tools

      A recent customer request highlighted that .forEach() and .toArray() are slow because they are iterating over the cursor one-by-one, which is significantly slower than getting all documents via .toArray() and iterating a simple array of documents.

      We should make mongosh's cursor .toArray() delegate to the driver .toArray(), and investigate whether we can perform some form of batching for .forEach() to improve performance.

              Assignee:
              Anna Henningsen
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: