Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-248

laravel-mongodb - Issue #3166: Performance Regression 5.x

    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      jensk has created Issue #3166: Performance Regression 5.x in laravel-mongodb. This Jira ticket was filed by GromNaN

      Issue Text:

      • Laravel-mongodb Version: 5.0.2
      • PHP Version: 8.3.12
      • Database Driver & Version: pecl/mongodb-1.20.0

      Description:

      Hello,

      We are experiencing a significant performance regression after upgrading to the latest version 5.0.2.

      Our test suite, comprising approximately 400 tests, 2,000 assertions, and 15,000 queries, used to complete in about 15 seconds with version 4.8.0. After the upgrade, it now takes around 50 seconds to complete. (on my local dev box)

      Individual HTTP requests or single tests do not exhibit any issues. In fact, performance for our average web request has slightly improved.

      The issue only shows up in long-running processes, such as a test suite.

      I have created a demo Laravel application that demonstrates the problem in a simple, isolated manner: [Demp-App](https://github.com/jensk/lara-mongo-debug)
      We were able to reproduce the issue in 3 different environments:

      • WSL2-Ubuntu/Mongo-7 via docker,
      • Archlinux/Mongo-7 via docker,
      • Gentoo/Mongo 4.4 without docker

      Steps to reproduce

      1. git clone https://github.com/jensk/lara-mongo-debug
      2. composer install
      3. vendor/bin/phpunit

      Expected behaviour

      Execution time of the tests should remain stable. ([Example results with 4.8](https://github.com/jensk/lara-mongo-debug/blob/main/phpunit-output-v4.8.0.txt))

      Actual behaviour

      Execution time increases slightly and linearly with each call to the various methods of laravel-mongodb. (e.g. truncate, delete, create ...) ([Example results with 5.0.2](https://github.com/jensk/lara-mongo-debug/blob/main/phpunit-output-v5.0.2.txt))

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: