revery-ui / revery

:zap: Native, high-performance, cross-platform desktop apps - built with Reason!
https://www.outrunlabs.com/revery/
MIT License
8.06k stars 196 forks source link

perf(diagnostics): Add naming for timers, add trace logging #1011

Closed bryphe closed 3 years ago

bryphe commented 3 years ago

In Onivim, there is a case where we are stuck rendering in a loop, every frame (which will peg the CPU) - based on the trace logs that I've seen, it looks like a timer is constantly running - likely related to an animation, or a hook that isn't disposed properly.

This adds additional tracing for animations and timers, such that when the app is running with trace logging enabled, it will output the various named timers that are active - hopefully giving us enough information to get to the next round of fixes.