core icon indicating copy to clipboard operation
core copied to clipboard

Player freezes when composition contains more than 30 clips

Open remorses opened this issue 1 month ago • 2 comments

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

  1. Create a composition with 40+ video clips
  2. Start playback
  3. 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.

remorses avatar Nov 24 '25 10:11 remorses

Just published an update which might fix this (4.0.3), can you check again?

k9p5 avatar Nov 25 '25 23:11 k9p5

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

remorses avatar Nov 26 '25 08:11 remorses

Still happening on 4.0.3

remorses avatar Dec 01 '25 12:12 remorses

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

remorses avatar Dec 01 '25 14:12 remorses