Browser freezes when i make answers to Module with Activity (H5P Quiz [Question Set]) containing many questions

Created on 22 May 2025, 3 months ago

Problem/Motivation

Problem is caused by events responsible for handling xAPI data.
Problematic file is:
https://git.drupalcode.org/project/opigno_module/-/blob/3.2.8/ActivityTy...

Steps to reproduce

I have Module with Activity (H5P Quiz [Question Set]) consists of 80 questions.
When i answer each question browser response grows exponentially.
The more i answer the more freeze and longer response i experience.

Proposed resolution

- Move .on('xAPI') outside and make sure it’s registered once.
- Throttle or debounce heavy functions (storeXAPIData).
- Reduce/cache repeated DOM lookups.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

3.2

Component

User interface

Created by

πŸ‡΅πŸ‡±Poland pozi

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

Comments & Activities

Production build 0.71.5 2024