Player freezes when composition contains more than 30 clips
Description
The player freezes after approximately 4 seconds of playback when a composition contains more than 30 clips, causing the entire web page to become unresponsive.
Reproduction Steps
- Create a composition with 40+ video clips
- Start playback
- After ~4 seconds, the player and web page will freeze
Key Observations
- This issue occurs regardless of video duration - it always happens when there are many clips in the composition
- The freeze timing is inversely related to the number of clips:
- With 40 clips: freeze occurs after ~4 seconds
- With 100 clips: freeze occurs after only ~2 seconds
- With fewer clips (e.g., 20-30): playback may complete without freezing
Reproduction Code
See PR #87 for a minimal reproduction case that demonstrates this issue.
Environment
- Browser: [All browsers tested]
- diffusionstudio/core version: latest
Expected Behavior
The player should handle compositions with many clips without freezing, regardless of the number of clips.
Actual Behavior
The player and entire web page become unresponsive after a few seconds of playback when many clips are present in the composition.
Just published an update which might fix this (4.0.3), can you check again?
I can only see 4.0.2 on npm, tried with that but the web page still freezes during playback after 3 seconds
Thank you for investigating this issue
Still happening on 4.0.3
It looks like if you pause and play again during the freeze the player starts playback with normal fps, then the behaviour kicks in again
https://github.com/user-attachments/assets/64e15236-3f0e-4f51-af9b-c2fcc1c0efcb