perf(ui-gpui): diagnostic counters confirm 2 renders/sec at window level (GPUI limit)
- Sidebar and StatusBar uncached (natural size collapsed with StyleRefinement::default) - ProjectGrid cached with flex-1 style (into_cached_flex) - AgentPane + TerminalView cached within ProjectBox - BlinkState::start() fixed with &mut *cx deref coercion - CPU: ~3% with full layout visible (down from 6.8% uncached) - Remaining: ProjectBox re-renders full tree on blink (reads BlinkState) - Next: isolate dot into StatusDotView entity to prevent ProjectBox re-render
This commit is contained in:
parent
a25e024d54
commit
1f26e5b272
4 changed files with 34 additions and 28 deletions
|
|
@ -85,34 +85,23 @@ impl Render for Workspace {
|
|||
.flex_row()
|
||||
.overflow_hidden();
|
||||
|
||||
// Sidebar (icon rail) — cached: only re-renders when sidebar entity is notified
|
||||
// Sidebar (icon rail) — uncached (tiny, cheap to render)
|
||||
if sidebar_open {
|
||||
main_row = main_row.child(
|
||||
self.sidebar.clone().into_cached_view(),
|
||||
);
|
||||
main_row = main_row.child(self.sidebar.clone());
|
||||
}
|
||||
|
||||
// Settings drawer (between sidebar and grid) — cached
|
||||
// Settings drawer (between sidebar and grid)
|
||||
if settings_open {
|
||||
main_row = main_row.child(
|
||||
self.settings_panel.clone().into_cached_view(),
|
||||
);
|
||||
main_row = main_row.child(self.settings_panel.clone());
|
||||
}
|
||||
|
||||
// Project grid (fills remaining space) — cached: only re-renders when grid entity is notified
|
||||
main_row = main_row.child(
|
||||
div()
|
||||
.flex_1()
|
||||
.h_full()
|
||||
.child(self.project_grid.clone().into_cached_view()),
|
||||
);
|
||||
// Project grid (fills remaining space) — cached with flex-1
|
||||
main_row = main_row.child(self.project_grid.clone().into_cached_flex());
|
||||
|
||||
root = root.child(main_row);
|
||||
|
||||
// ── Status bar (bottom) — cached: only re-renders on status change
|
||||
root = root.child(
|
||||
self.status_bar.clone().into_cached_view(),
|
||||
);
|
||||
// Status bar (bottom) — uncached (tiny, cheap to render)
|
||||
root = root.child(self.status_bar.clone());
|
||||
|
||||
// ── Command palette overlay (if open) ───────────────
|
||||
if palette_open {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue