Repository navigation
perf(host): 缩短首次快照等待时间 - #119
Merged
Merged
Conversation
首次快照使用既有的 250 ms 最短采样间隔,启动设置保留该期限,之后恢复所选采样周期。隔离隐藏启动的首次快照中位数由 1455 ms 降至 715 ms。
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task-manager replacement starts keep the main window hidden until the first snapshot is accepted by the UI. After the collector finishes priming, the sampler currently waits a normal update interval; restoring startup settings can also move that first deadline. This adds avoidable waiting before the window can be shown.
Schedule the first snapshot at the existing 250 ms minimum sample gap, retain that deadline while startup controls load, and establish the selected regular cadence from the first sample. The minimum gap for rate counters, complete snapshot collection, subsequent foreground/background/paused cadence, and the task-manager readiness handshake are preserved. Includes two regression tests and the corresponding host architecture documentation.
Validation
cargo fmt -p argus-app --checkARGUS_LOCALE=en-US cargo test --locked -p argus-app --lib sampler::tests: 8 passed, including the two new startup scenarios. The new scenarios fail with the previous schedule logic.69e8c6d6) and changed EXEs with Rust 1.100.0 MSVC and the same release profile.--hidden --test --identifierprofiles on inactive desktops. Time from the startup log to the first collected snapshot:The measured reduction is 740 ms (51%) in this hidden-start path. Windows 11 25H2, Ryzen 5 7500F, RTX 4060; new processes with natural/warmed filesystem caches, no cache purge or reboot.
An already displayed inactive test window requests an immediate refresh in both versions, so there was no consistent improvement there: median first nonempty process response was 811 ms vs 799 ms, with a 1,126 ms outlier in one changed run. This PR makes no general speedup claim for that path.
A short steady-state check after 25 seconds of warmup retained approximately 238 presented frames/s, a 4.17 ms p95 frame interval, zero frames longer than 50 ms, and comparable private memory (158 vs 157 MiB while shown). CPU/GPU and hidden-window counters were also collected; varying desktop load means this single pair is a regression smoke check, not a steady-state performance claim. All 12 startup runs and both steady checks exited successfully without foreground-activation violations.
The complete installed IFEO/hotkey path and the first launch after a reboot were not benchmarked. This change removes the confirmed post-priming wait; it does not claim to explain or eliminate an entire reported five-second cold launch.