mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-09 22:52:08 +08:00
605dfaa1a9
* ui: keep arc_bar_pts cache hot when bar is translated The LRU cache key included (cx, cy), which change every frame when the parent widget's rect translates (e.g. during a scroll animation in MainLayout). That made every cache lookup miss, recomputing the arc geometry twice per frame and dropping fps. Compute the shape at origin (so the cache key only depends on the geometry: radius, thickness, angles), then translate to (cx, cy) after. Cache stays hot under translation. Measured on comma four (engaged, scrolling): ~5fps recovered while moving between layouts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fully clean up * fully clean up --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>