Context
Render architecture audit from #203. theme::resolve_theme(window, theme_mode) is called unconditionally at the top of AnotherOneApp::render on every frame — at 16ms ticks during active use, that is ~62 calls per second for a value that changes only when the user explicitly toggles the theme.
Location
app/src/app.rs — first lines of AnotherOneApp::render, immediately after control_registry.borrow_mut().clear().
What to do
Cache the resolved theme on AnotherOneApp (e.g. cached_theme: Option<Theme>). At the top of render, only call resolve_theme when theme_mode has changed since the last frame (compare against a stored last_theme_mode). The terminal snapshot rebuild that also triggers on theme change (a few lines later) is already gated on the result — keep that gate.
Small change, zero architectural risk, measurable reduction in per-frame work.
Context
Render architecture audit from #203.
theme::resolve_theme(window, theme_mode)is called unconditionally at the top ofAnotherOneApp::renderon every frame — at 16ms ticks during active use, that is ~62 calls per second for a value that changes only when the user explicitly toggles the theme.Location
app/src/app.rs— first lines ofAnotherOneApp::render, immediately aftercontrol_registry.borrow_mut().clear().What to do
Cache the resolved theme on
AnotherOneApp(e.g.cached_theme: Option<Theme>). At the top of render, only callresolve_themewhentheme_modehas changed since the last frame (compare against a storedlast_theme_mode). The terminal snapshot rebuild that also triggers on theme change (a few lines later) is already gated on the result — keep that gate.Small change, zero architectural risk, measurable reduction in per-frame work.