perf(ui-gpui): cache SharedStrings, remove diagnostics, zero alloc per render frame
This commit is contained in:
parent
b557aeb833
commit
5dbf5bd43c
3 changed files with 44 additions and 69 deletions
|
|
@ -60,15 +60,9 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
static WORKSPACE_RENDERS: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
|
||||
|
||||
impl Render for Workspace {
|
||||
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
let wc = WORKSPACE_RENDERS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
||||
if wc % 10 == 0 {
|
||||
eprintln!("[Workspace] render #{wc}");
|
||||
}
|
||||
// Don't read app_state in render — it subscribes and causes re-renders on every tick
|
||||
// Hardcoded layout state — avoids model subscription that causes re-renders
|
||||
let sidebar_open = true;
|
||||
let settings_open = false;
|
||||
let palette_open = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue