Skip to content

perf(updater): mark each step between the click and a started update helper - #1241

Merged
Hona merged 1 commit into
devfrom
perf/updater-handoff-marks
Nov 25, 2026
Merged

Hona merged 1 commit into
devfrom
perf/updater-handoff-marks

Conversation

@Hona

@Hona Hona commented Nov 25, 2026

Copy link
Copy Markdown
Member

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-489 to 0.0.0-dev-490, the old app's own marks put most of the person's wait before the app even starts to quit:

  • The press is handled about 5 ms after the click.
  • The helper process exists 316-670 ms after the click.
  • quit.start follows 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_off in that window, and no mark separates them:

  1. verify_quick: the staged exe's signer check (WinVerifyTrust, no revocation, URL cache only).
  2. Copying the setup's receipt into the staged folder.
  3. The helper's hard link in the updates folder.
  4. CreateProcessW of the helper.

Change

features/updater/src/windows.rs, hand_off: rune::marks::mark at its start and after each step:

Mark After
update.handoff.start entering hand_off
update.handoff.verified verify_quick
update.handoff.receipt the receipt copy
update.handoff.linked the helper's hard link
update.handoff.spawned the helper's spawn

No mark is on a hot path: hand_off runs once per update, at the click.

Testing

  • Guardrails: pass locally.
  • CI: builds the change.
  • Not run: none of the new marks has been seen yet. They show in the old app's --launch-trace line of the first real update from a build that has this change.

@Hona
Hona merged commit 2a02e64 into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the perf/updater-handoff-marks branch November 25, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant