google/tracing-framework

Optimize playback for replay frame timing

ScottTodd opened this issue · 2 comments

At the moment, visualizers and event iterators add overhead to each event processed during playback. This makes frame timings less accurate than they could be (particularly for traces with a large number of events per frame), so I'd like to optimize the continuous replay mode within playback.

I tried some preprocessing on the events being realized each step over here, hoping to handle some of the event lookups before starting to render.

In local debug mode, timings on this website went from 41 FPS to 58 FPS and timings on this website went from 43 FPS to 53 FPS.

From the packaged extension (release mode), timings went from 64 FPS to 58 FPS on the first site (performance hit instead of performance boost).

I'm confident that these changes help in debug mode, but they don't seem to help in release mode, at least in their current state.

Closing this issue since release mode performance seems fine. It might be worth revisiting this if/when more Visualizers are added.