You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plays smoothly on most major browsers (Chrome, Safari, Edge) except Firefox.
Profiling shows jank animation frames any time there are GC pauses.
There should be a nominal amount of allocations per frame, most of which are outside of the control of tetanes or tetanes-core. e.g. events from winit and the event loop call to request_animation_frame. I've yet to discover any solutions that reduce these GC pauses for a smooth framerate.
List of things tried with little to no effect:
Disable NTSC filter (reduces CPU usage)
Hide menu bar (removes string allocations for egui menus)
Disable cycle accurate (reduces CPU usage)
Firefox stable and Firefox nightly both have this issue across Linux, macOS, and Windows platforms.
The text was updated successfully, but these errors were encountered:
More investigation has shown that the main culprit for GC pauses and large amounts of CPU time are the construction and dropping of the AbortController signal used by the Scheduler inside winit which comes from using ControlFlow::Poll.
Creating and destroying these constantly per-frame seems to really stress out the GC and it turns out to be unneeded. By always doing ControlFlow::WaitUntil with either the next repaint time, or 16ms (60fps) performance is much improved.
Easy to reproduce:
Plays smoothly on most major browsers (Chrome, Safari, Edge) except Firefox.
Profiling shows jank animation frames any time there are GC pauses.
There should be a nominal amount of allocations per frame, most of which are outside of the control of
tetanes
ortetanes-core
. e.g. events fromwinit
and the event loop call torequest_animation_frame
. I've yet to discover any solutions that reduce these GC pauses for a smooth framerate.List of things tried with little to no effect:
egui
menus)Firefox stable and Firefox nightly both have this issue across Linux, macOS, and Windows platforms.
The text was updated successfully, but these errors were encountered: