Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance in Firefox #283

Open
odecay opened this issue Nov 26, 2022 · 1 comment
Open

Poor performance in Firefox #283

odecay opened this issue Nov 26, 2022 · 1 comment
Labels
help wanted It would be great if somebody could help out with this one! kind:bug Something isn't working scope:undetermined Undetermined size, needs investigation

Comments

@odecay
Copy link
Collaborator

odecay commented Nov 26, 2022

Description

The game framerate and sound effects both seem to exhibit considerable stuttering when played in Firefox.
I hadn't noticed this in builds previous to v0.2.0.

Performance seems fine in Chromium.

Maybe we are passing around too much metadata now? or maybe there is some other simple thing which didn't make itsself apparent.
Not sure the best way to do web profiling but it may make sense to do some general performance profiling.

To Reproduce

Play https://fishfolk.github.io/punchy/player/v0.2.0/ in Firefox

Expected Behavior

no stutter

Additional Context

It may be helpful if others could test and report whether they have stutter in the current build above and previous web builds found on the releases page https://github.com/fishfolk/punchy/releases

Log Messages

No response

@odecay odecay added kind:bug Something isn't working scope:undetermined Undetermined size, needs investigation help wanted It would be great if somebody could help out with this one! labels Nov 26, 2022
@zicklag
Copy link
Member

zicklag commented Nov 26, 2022

To profile, you can open the dev tools in Firefox, go to the performance tab, and start recording.

For me the gameplay seems somewhat smooth, but the sound playback is horrible. I have never actually been able to get sound to play well in Firefox before, and if it's slowing up the game frame rate for you, maybe it's related to sound playback.

I feel like it's not something major in the game itself, but something fundamental to the way Firefox either handle's audio playback or something like that.

You may want to disable the sounds and see if you still have an issue.

Maybe we are passing around too much metadata now?

I highly doubt it. The assets are loaded once and then put into pure Rust structs, with no extra penalties for data access at that point, especially for the data that we copy directly into a Bevy component and don't access with the handle. I could doubtless still be wrong, and I'm no performance/profiling export, but it also doesn't look like there's anything suspicious in the Firefox profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted It would be great if somebody could help out with this one! kind:bug Something isn't working scope:undetermined Undetermined size, needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants