Repository navigation
perf(updater): mark each step between the click and a started update helper - #1241
Merged
Merged
Conversation
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.
Adds five launch-trace marks to the Windows updater's
hand_off, so a real update's trace shows which step takes the time between the person's click on Install and restart and a started update helper. Behaviour does not change.Why
In nine real updates from
0.0.0-dev-489to0.0.0-dev-490, the old app's own marks put most of the person's wait before the app even starts to quit:quit.startfollows about 20 ms later, and the whole quit (quit.start->main.return) takes 32-56 ms in 8 of 9 runs.Four steps run inside
hand_offin that window, and no mark separates them:verify_quick: the staged exe's signer check (WinVerifyTrust, no revocation, URL cache only).CreateProcessWof the helper.Change
features/updater/src/windows.rs,hand_off:rune::marks::markat its start and after each step:update.handoff.starthand_offupdate.handoff.verifiedverify_quickupdate.handoff.receiptupdate.handoff.linkedupdate.handoff.spawnedspawnNo mark is on a hot path:
hand_offruns once per update, at the click.Testing
--launch-traceline of the first real update from a build that has this change.