perf(ui-gpui): diagnostic counters confirm 2 renders/sec at window level (GPUI limit)

This commit is contained in:
Hibryda 2026-03-19 09:33:34 +01:00
parent 7ab5d97352
commit b557aeb833
2 changed files with 57 additions and 47 deletions

View file

@ -117,8 +117,12 @@ impl ProjectBox {
}
}
static PB_RENDERS: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
impl Render for ProjectBox {
fn render(&mut self, _window: &mut Window, _cx: &mut Context<Self>) -> impl IntoElement {
let pbc = PB_RENDERS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
if pbc % 10 == 0 { eprintln!("[ProjectBox] render #{pbc}"); }
let accent = accent_color(self.project.accent_index);
let name = self.project.name.clone();
let cwd = self.project.cwd.clone();