perf(ui-gpui): diagnostic counters confirm 2 renders/sec at window level (GPUI limit)
This commit is contained in:
parent
7ab5d97352
commit
b557aeb833
2 changed files with 57 additions and 47 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue