Skip to content

Conversation

@cli-ish
Copy link

@cli-ish cli-ish commented Apr 9, 2025

Info

We are excited to present this one-liner patch that significantly improves the runtime (up to 100x faster). Our team has conducted extensive research and testing as part of a client project. We hope this enhancement helps you with the previously slow backups in your Moodle installations. If you have any questions, you can reach us through our website: Sudile GbR.

The exact impacts of this change are described below.

Solution

https://github.com/h5p/moodle-mod_hvp/blob/stable/backup/moodle2/backup_hvp_stepslib.php#L243
The line at this location needs to be:

$libraries->annotate_files('mod_hvp', 'libraries', null, $context->id);

Explanation

All the library files exist in the context system and therefore have no context difference. If added to the child element $library, Moodle tries to add all module files into the library node. This leads to a situation where, for each library, all the files are being loaded. Only at the very end does Moodle resolve the issue by saving the files in the archive, which only allows unique files by hash.

Related issues

#423 #262 #253 #423 #561

Vincent Schneider (vincent.schneider@sudile.com)

@otacke
Copy link
Contributor

otacke commented Apr 24, 2025

@cli-ish Unfortunately, H5P Group hardly ever reacts to pull requests unless they are accompanied by a ticket on their JIRA instance (https://h5ptechnology.atlassian.net/jira/software/c/projects/HFP/issues). You can ask them to create one via their forums (https://h5p.org/forum).

@cli-ish
Copy link
Author

cli-ish commented Apr 24, 2025

I just added the forum entry https://h5p.org/node/1528518, not sure why this was necessary.

@otacke
Copy link
Contributor

otacke commented Apr 24, 2025

@cli-ish As I said: they do neither monitor pull requests here on github nor do they let a pull request trigger automated ticket generation on their JIRA instance. They would simply not learn about your contribution. Their forums are monitored by BV, and he can create a JIRA ticket, so your pull request actually ends up on their radar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants