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

Very slow sync find

    XMLWordPrintable

    Details

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

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: