Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3971

Optimize database usage for reading the config DB table

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.9.5
    • 4.0.0
    • Offline
    • Hide

      Database performance should improve but the functionality should stay the same. This issue can be tested with the release QA.

      Show
      Database performance should improve but the functionality should stay the same. This issue can be tested with the release QA.
    • MOODLE_39_STABLE
    • MOODLE_400_STABLE
    • Moodle App 4.0

    Description

      The current implementation relies too heavily on the database for read operations and this is causing performance issues during start up (and probable elsewhere).

      An improvement would be to query the entire contents of a database table initially, and run read operations against the in-memory data. This speeds up reads considerably, at the cost of increasing write operations because those have to be replicated for the in-memory cache. This solution also increases memory usage. But in some situations, both of these are worthy trade-offs.

      For this task, we can implement this pattern for one of the tables that would benefit the most from this: core_config. In subsequent issues and after further research in MOBILE-3821, we can apply the same pattern to other tables.

      Attachments

        Issue Links

          Activity

            People

              noeldemartin Noel De Martin
              noeldemartin Noel De Martin
              Dani Palou Dani Palou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                22/Apr/22