Repository navigation
perf(gui): open the first window faster - #381
chrispository wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Pin GPUI to chrispository/gpui-omarchy perf/window-open-stack-par (4e83a9b): thisisgm/gpui-omarchy#7 on top of the current pin (04965e8). That stack starts the Wayland renderer in the window's final alpha mode (pipelines built once instead of three times), lets apps create the Vulkan instance ahead of the first window, and builds the render pipelines on up to four threads. Call gpui_platform::prewarm_gpu() before the locale and settings work, so the Vulkan driver loads on a background thread while startup work runs. RTX 4090, 100k-file folder, page cache dropped before every launch, medians of 5-6 interleaved launches against main: shader cache warm: window mapped 452 -> 305 ms (-33%), settled 953 -> 805 ms (-16%) shader cache cold: window mapped 699 -> 397 ms (-43%), settled 1199 -> 887 ms (-26%) PSS +0.5% warm, +2.7% cold; CPU time -1% warm, -10% cold Repoint the pin to thisisgm/gpui-omarchy once thisisgm#7 merges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
f169662 to
6d6418b
Compare
|
The first window opened slower than it needed to; your change landed as a co-authored commit in 3048f43, shipped in v0.4.1. Thanks @chrispository! https://github.com/thisisgm/flea/releases/tag/v0.4.1 |
This will need to wait until after this is merged, then repoint this to the main flea repo.
thisisgm/gpui-omarchy#7
Summary
Opens the first window faster, mostly on NVIDIA: 33% faster on an everyday launch and 43% faster on first launch or after a driver update. This replaces #378 and #379.
One commit with two parts:
Pin bump: GPUI moves to
chrispository/gpui-omarchy@4e83a9b(perf/window-open-stack-par), which is perf: open the first window faster (final alpha mode, Vulkan prewarm, parallel pipelines) gpui-omarchy#7 on top of the current pin04965e8. That stack does three things:Repoint the pin to
thisisgmonce perf: open the first window faster (final alpha mode, Vulkan prewarm, parallel pipelines) gpui-omarchy#7 merges.crates/flea-gui/src/main.rs(+3): callsgpui_platform::prewarm_gpu()before the locale and settings work, so the Vulkan driver loads on a background thread while startup work runs.Numbers
Setup:
XDG_STATE_HOME.The middle column is the alpha-mode and prewarm half of the change (the old #378 and #379), shown so each half's share is visible.
Shader cache warm: the everyday launch (6 launches per build)
mainShader cache cold: first launch, or after a driver update (5–6 launches per build)
mainThe per-change measurements, the memory trade-off of the thread count, and the remaining NVIDIA driver cost (~100 ms of driver init and device creation, plus ~17 MiB of driver memory per process) are in thisisgm/gpui-omarchy#7.
Where to call
prewarm_gpu(): the chosen spot is right after backend log setup, beforeService::launch. Calling it on the first line ofmainwas no faster (176.2 vs 176.9 ms, page cache warm). Calling it after the settings worker spawns lost most of the gain (186.1 ms).Visual check
Screenshots against
mainin all three Omarchy window modes (opaque,transparent,glassy). Each window was opened in every mode, then switched through the others while it stayed open. Nothing differed except a hover highlight and a folder size that was still being counted.Diff
Cargo.toml: 2 lines.Cargo.lock: only the GPUI package sources change.crates/flea-gui/src/main.rs: +3.cargo metadata --lockedresolves. The benchmarked build used the same Flea and GPUI code, with GPUI built from a local checkout.Not measured: Intel and AMD.
🤖 Generated with Claude Code