Moodle
  1. Moodle
  2. MDL-34145

$DB->get_tables performance is not good on postgres <= 9.0

    Details

      Description

      ... which then makes unit tests painfully slow.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Tim Hunt added a comment -

            Thanks to skodak for helping with this.

            Show
            Tim Hunt added a comment - Thanks to skodak for helping with this.
            Hide
            Petr Skoda added a comment -

            My phpunit execution times before the patch (OSX macports versions of PG on SSD):

            • 9.0.8 - 01:46
            • 9.1.4 - 01:03
            • 9.2beta - 01:00
            Show
            Petr Skoda added a comment - My phpunit execution times before the patch (OSX macports versions of PG on SSD): 9.0.8 - 01:46 9.1.4 - 01:03 9.2beta - 01:00
            Hide
            Petr Skoda added a comment - - edited

            I have also verified that the new non-portable version works for all PG versions, I think we should use the "version if" because in future we should use the more standardised query only (once we drop support for pg 9.0).

            With the patch pg 9.0.8 executes the tests in 01:00 for me too, congrats!

            Show
            Petr Skoda added a comment - - edited I have also verified that the new non-portable version works for all PG versions, I think we should use the "version if" because in future we should use the more standardised query only (once we drop support for pg 9.0). With the patch pg 9.0.8 executes the tests in 01:00 for me too, congrats!
            Hide
            Dan Poltawski added a comment -

            (out of interest) How much quicker does it go for you Tim? What are your before/after times?

            Show
            Dan Poltawski added a comment - (out of interest) How much quicker does it go for you Tim? What are your before/after times?
            Hide
            Tim Hunt added a comment -

            Dev chat is here: http://moodle.org/local/chatlogs/index.php?conversationid=10522#c365835

            get_tables went from 2 seconds to about 0.02 seconds for me. It seems we have about 3 get_tables calls when starting the unit tests, so the start-up time decreased by 6 seconds for me. That makes a huge difference when you are just running a few tests.

            Show
            Tim Hunt added a comment - Dev chat is here: http://moodle.org/local/chatlogs/index.php?conversationid=10522#c365835 get_tables went from 2 seconds to about 0.02 seconds for me. It seems we have about 3 get_tables calls when starting the unit tests, so the start-up time decreased by 6 seconds for me. That makes a huge difference when you are just running a few tests.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated (21, 22, 23 and master), thanks!

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated (21, 22, 23 and master), thanks!
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Tested 21 install, upgrade to 22 and unit test execution under master. All working ok and speedier. Passing!

            Show
            Eloy Lafuente (stronk7) added a comment - Tested 21 install, upgrade to 22 and unit test execution under master. All working ok and speedier. Passing!
            Hide
            Sam Hemelryk added a comment -

            Congratulations your code is upstream - gold star for you!

            This issue + 79 others made it in in time for the minor releases.
            Thank you everyone involved for your exuberant efforts.

            Show
            Sam Hemelryk added a comment - Congratulations your code is upstream - gold star for you! This issue + 79 others made it in in time for the minor releases. Thank you everyone involved for your exuberant efforts.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: