Files in questions can drastically slow course restore [MDL-79005]

Files in questions can drastically slow course restore [MDL-79005]

by Leon Stringer -
Number of replies: 0

A file in a question is restored once per non-empty course question bank subcategory. If you have 10 questions each with a different JPEG, you'd expect there to be 10 corresponding file restores, but if you have N non-empty question bank subcategories there are actually N×10 restores. If you have many files and/or subcategories this number can get very big making course restores take longer than necessary and increasing server load during the restore.

If anyone is interested on working with me on this uninspiring issue I think the starting points are:

  1. Confirm if my analysis of the problem correct.
  2. Investigate whether the fix is as straightforward as my initial suggestion supposes.
  3. See if there is any/enough automated test coverage to be confident that any proposed fix doesn't break restores.