Skip to content

Commit ee62e95

Browse files
committed
fix(perf): keep startup instrumentation focused
1 parent 6dc5989 commit ee62e95

3 files changed

Lines changed: 3 additions & 15 deletions

File tree

packages/tauri-app/src-tauri/src/cli_manager.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ use std::thread;
1717
use std::time::{Duration, Instant};
1818
use tauri::{webview::cookie::Cookie, AppHandle, Emitter, Manager, Url};
1919

20-
#[cfg(windows)]
21-
use std::os::windows::process::CommandExt;
22-
23-
#[cfg(windows)]
24-
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
25-
2620
fn log_line(message: &str) {
2721
println!("[tauri-cli] {message}");
2822
}
@@ -52,13 +46,6 @@ const SESSION_COOKIE_NAME: &str = "codenomad_session";
5246

5347
const CLI_STOP_GRACE_SECS: u64 = 30;
5448

55-
fn configure_spawn(command: &mut Command) {
56-
#[cfg(windows)]
57-
{
58-
command.creation_flags(CREATE_NO_WINDOW);
59-
}
60-
}
61-
6249
fn navigate_main(app: &AppHandle, url: &str) {
6350
if let Some(win) = app.webview_windows().get("main") {
6451
let mut display = url.to_string();
@@ -488,7 +475,6 @@ impl CliProcessManager {
488475
.env("ELECTRON_RUN_AS_NODE", "1")
489476
.stdout(Stdio::piped())
490477
.stderr(Stdio::piped());
491-
configure_spawn(&mut c);
492478
if let Some(ref cwd) = cwd {
493479
c.current_dir(cwd);
494480
}
@@ -501,7 +487,6 @@ impl CliProcessManager {
501487
.env("ELECTRON_RUN_AS_NODE", "1")
502488
.stdout(Stdio::piped())
503489
.stderr(Stdio::piped());
504-
configure_spawn(&mut c);
505490
if let Some(ref cwd) = cwd {
506491
c.current_dir(cwd);
507492
}

packages/ui/src/main.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { I18nProvider } from "./lib/i18n"
88
import { storage } from "./lib/storage"
99
import { beginPerfTrace, getPerfTrace, markPerf, measurePerf } from "./lib/perf"
1010
import "./index.css"
11+
import "@git-diff-view/solid/styles/diff-view-pure.css"
1112

1213
const root = document.getElementById("root")
1314

packages/ui/src/renderer/loading/main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ function LoadingApp() {
137137

138138
const result = await tauriBridge.invoke<CliStatus>("cli_get_status")
139139
if (result?.state === "ready" && result.url) {
140+
markPerf("loading.tauri.cli.ready", { url: result.url, source: "status-on-load" })
141+
measurePerf("loading_to_cli_ready", "loading.screen.mounted", "loading.tauri.cli.ready")
140142
markPerf("loading.tauri.status.ready-on-load", { url: result.url })
141143
navigateTo(result.url)
142144
} else if (result?.state === "error" && result.error) {

0 commit comments

Comments
 (0)