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

Improve filter_data performance on large sites

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Enable filter_data at system level (Site admin -> Plugins -> Filters...) in contents and headings
      2. Add a database instance in the frontpage
        1. Add a text field setting 'Allow autolink' to 1
          1. Add an entry named "entry1"
      3. Add a database instance in your XXX course
        1. Add a text field setting 'Allow autolink' to 1
          1. Add an entry named "entry2"
      4. Go to course XXX and add a label
        1. Enter a text containing "entry1" and "entry2" (something like I like entry1 to entry2, whatever)
        2. Save changes
      5. Move to course/view.php?id=YOURID if you are not redirected there after saving changes
      6. The label you just added SHOULD contain links to entry1 and entry2 database entries
      Show
      Enable filter_data at system level (Site admin -> Plugins -> Filters...) in contents and headings Add a database instance in the frontpage Add a text field setting 'Allow autolink' to 1 Add an entry named "entry1" Add a database instance in your XXX course Add a text field setting 'Allow autolink' to 1 Add an entry named "entry2" Go to course XXX and add a label Enter a text containing "entry1" and "entry2" (something like I like entry1 to entry2 , whatever) Save changes Move to course/view.php?id=YOURID if you are not redirected there after saving changes The label you just added SHOULD contain links to entry1 and entry2 database entries
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-44367_master

      Description

      As a follow-on to MDL-43524 which removed global text caching, we need to examine the database filter and probably add MUC caching there to improve performance.

      The database filter is what puts links in texts to database entries. There is quite a lot of processing going on in the background even before the simple text replacement, and this needs to be redone every time the cache is invalidated.

      Petr has raised that the fully correct way would be to use new events or the as-yet-unwritten hooks to invalidate the caches, but I think that might be too much to do before 2.7, so I want to see a quick solution here even if it may mean relying on less-perfect cache invalidation.

      Tests showing performance before/after are required.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dmonllao David Monllaó
                Reporter:
                dougiamas Martin Dougiamas
                Peer reviewer:
                Tim Hunt
                Integrator:
                Dan Poltawski
                Tester:
                Simey Lameze
                Participants:
                Component watchers:
                Matteo Scaramuccia, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Jake Dallimore, Jun Pataleta
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15