Performance issue when saving content

Created on 24 August 2022, almost 3 years ago
Updated 7 August 2025, 5 days ago

Problem/Motivation

When saving H5P content, a new content ID is used for each revision (even if the H5P content is identical).

When exporting is enabled (i.e. H5PCore::exportEnabled), this means a new ZIP is created every time the entity is saved. On my local machine this can take well over second, but on production with a network filesystem it can be more like 40-50 seconds especially when using H5PColumn or similar.

I started to look into trying to re-use existing exports when the actual H5P content hasn't changed, but there are subtle differences between the params/metadata that gets saved in the export vs. what gets submitted by the form, so there would need to be a way to standardize the two arrays before being possible to compare.

Also wondering if there's a less i/o intensive way to generate the zip - i.e. does it really need to write files to tmp only to read them out from tmp again, could they not be directly added to the zip?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States sim_1

    I was noticing this a few months ago on a site. But haven't noticed it as much since upgrading to the the most recent release (alpha6). Is anyone else still experiencing this?

Production build 0.71.5 2024