Jonah Williams 42e24ed927 [engine] request frame rate once per frame. (flutter/engine#47954)
With the current stopwatch design, we request the frame rate multiple times per frame. On Android this calls into JNI which is pretty slow. If we cache the value at construction of the StopwatchVisualizer, then we will only compute it once per frame (because the StopwatchVisualizer is reconstructed each frame).

Fixes https://github.com/flutter/flutter/issues/137797

So the issue isn't that we're checking the fresh rate every frame, its that we were checking N times on each frame.
2023-11-13 17:53:52 +00:00
Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%