Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-600

Very slow sync find

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.0.0-beta.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Finding documents with the sync API in Rust is very slow.

       

      Actual behaviour:
      When executing collection.find() with the exact same parameters in Rust (mongodb::sync subpackage) and in Python3, Rust needs 19.8 seconds to query 250K documents, while Python3 needs only 1.1 seconds.

       

      Expected behaviour:

      Rust should need slightly less time than Python.

       

      Steps to reproduce:

      Populate a collection with a few thousand documents, and execute the same find query once in Rust and once in Python3 that returns a few thousand documents as well.

      I have created a GitHub repository with sample code and three scripts to reduce reproduction time: https://github.com/RandomApfel/mongo-rust-slow-issue-reproduction

            Assignee:
            Unassigned Unassigned
            Reporter:
            buetter-julian@t-online.de Julian Büttner
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: