Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add log message on first render (#40749)
Julia Ryanea6e6dbda121
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 3c8c94ce0e9..51a4edbf256 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -102,7 +102,10 @@ use std::{path::{Path, PathBuf},process::ExitStatus,rc::Rc,- sync::{Arc, LazyLock, Weak, atomic::AtomicUsize},+ sync::{+ Arc, LazyLock, Weak,+ atomic::{AtomicBool, AtomicUsize},+ },time::Duration,};use task::{DebugScenario, SpawnInTerminal, TaskContext};@@ -6358,6 +6361,10 @@ impl Render for DraggedDock {impl Render for Workspace {fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {+ static FIRST_PAINT: AtomicBool = AtomicBool::new(true);+ if FIRST_PAINT.swap(false, std::sync::atomic::Ordering::Relaxed) {+ log::info!("Rendered first frame");+ }let mut context = KeyContext::new_with_defaults();context.add("Workspace");context.set("keyboard_layout", cx.keyboard_layout().name().to_string());