mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
Add log message on first render (#40749)
Having this in our logs with a timestamp should help when users submit issues with logs about slow startup time. Release Notes: - N/A
This commit is contained in:
parent
a56122e144
commit
ea6e6dbda1
1 changed files with 8 additions and 1 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue