phaserjs / phaserjs/phaser

jank in mixed bodies physics example (Firefox only)

Open
#7,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
40.3k
Forks
7.2k
PR merge metrics
No merged PRs in 30d

Description

Version

Description

If I grab one of the objects in this example and drag it around quickly, I can trigger a 1.5s freeze. In Chrome, I can't reproduce this hitch, but I notice that I have fewer objects left on screen after shaking for a while, so it's possible that the moment something first levels the visible part of the scene is related to when the slowdown happens.

Edit: I believe the hitch happens whenever something is pushed off-screen; once recognizing this, I was first able to reproduce two perf hitches in the same session (without refreshing or changing tabs)

Example Test Code

https://phaser.io/examples/v3.85.0/physics/matterjs/view/mixed-bodies

Additional Information

A normal perf trace
Image

A trace for the "jank" moment as labelled by the devtools debugger :-)
Image

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the mixed-bodies Matter physics example at the linked Phaser example URL and reproduce the hitch in Firefox while dragging bodies quickly, especially as objects leave the visible scene. Compare a performance trace with Chrome and Firefox; done means the reproducible freeze is eliminated without introducing the reported object-loss behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.