jank in mixed bodies physics example (Firefox only)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 40.3k
- Forks
- 7.2k
- PR merge metrics
- No merged PRs in 30d
Description
Version
- Phaser Version: https://phaser.io/examples/v3.85.0/physics/matterjs/view/mixed-bodies
- Operating system: MacOS 15.4.1 (24E263)
- Browser: Firefox 140.0.4
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
A trace for the "jank" moment as labelled by the devtools debugger :-)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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