Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53213

Make databasemeta cache a simpledata cache and improve performance

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Database meta calls are used throughout the entire system.

      1. All PHPUnit and Behat tests must pass on ALL databases.
      2. Installing a new site and browsing around works.
      3. Restoring the course from MDL-40579 works without error (There may be warnings that aren't related to database meta)

      For performance verification;
      1. Obtain the script from MDL-53208 and run that on official master (before integration)
      2. Run the script again with the integrated version. Compare results.

      As it's now using simple data the performance will be much greater. Be warned that integration of MDL-53208 will also increase performance so my may be measuring the changes from both in this test. MDL-53208 improves across the board, where this is specific to the database meta cache.

      Show
      Database meta calls are used throughout the entire system. 1. All PHPUnit and Behat tests must pass on ALL databases. 2. Installing a new site and browsing around works. 3. Restoring the course from MDL-40579 works without error (There may be warnings that aren't related to database meta) For performance verification; 1. Obtain the script from MDL-53208 and run that on official master (before integration) 2. Run the script again with the integrated version. Compare results. As it's now using simple data the performance will be much greater. Be warned that integration of MDL-53208 will also increase performance so my may be measuring the changes from both in this test. MDL-53208 improves across the board, where this is specific to the database meta cache.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:

      Description

      1. Update the database_column_info class so that it can only be read from once constructed. This means references passed around are not a problem.
      2. update the cache information to state databasemeta now uses 'simpledata'.
      3. update the sql generator so that it uses isset for tables rather than an array search.
      4. Cache the cache instance inside the database class as calling cache::make() is expensive.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr-russ Russell Smith
              Reporter:
              mr-russ Russell Smith
              Peer reviewer:
              Marina Glancy
              Integrator:
              Dan Poltawski
              Tester:
              Rajesh Taneja
              Participants:
              Component watchers:
              Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16