h5p / moodle-mod_hvp

H5P Plugin for Moodle
GNU General Public License v3.0
131 stars 168 forks source link

Cache / prebuild hvp_libraries.xml instead of building it from scratch for each backup #534

Open tsbartel opened 5 months ago

tsbartel commented 5 months ago

As other issues have reported, backups with libraries tend to get big and - which is worse - extremely slow. The reason for this is the backup step backup_hvp_libraries_structure_step (see code).

The file hvp_libraries.xml can reach sizes of 30-40 MB and take up to 40 minutes to build depending on the number of libraries installed. There may very well be sites where these numbers are exceeded.

Suggestion: Create a folder hvp in the moodledata directory, where a nightly cronjob builds the file or rebuilds it if the libraries have been updated. Ideally, build a course-specific file that only contains libraries (and dependencies) actually used within the course!

Reasoning:

Pros:

Cons: