Skip to content

perf(updater): finite pulse for the update chip (#1554) - #1598

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1554-update-chip-pulse
Oct 15, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1554-update-chip-pulse

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

The update chip used `_pulse.repeat(reverse: true)`, so while a newer release was pending the engine produced a frame at the display rate forever: ~30% of one CPU core in an otherwise idle app (measured in the issue; a `RepaintBoundary` did not help, the cost is the per-frame pipeline, not the chip repaint).

The chip now pulses for `kUpdateBadgePulseLegs` (6 legs = three breaths, ~8 s at Full motion, half of that at Reduced) and then settles to the static chip colors. The pulse runs once per pending update: re-syncs from the controller or a dependency change do not restart it, and it pulses again only after the badge went away (dismissed, installed, or a new update).

Off / OS `disableAnimations` behaviour is unchanged.

Tests (not run locally; CI will)

  • New: the pulse stops after the finite duration, stays idle on a repeated `setPendingUpdate`, and starts again after the badge was cleared.
  • The existing visible / motion-off / reduced-period tests are untouched.

Not done here

The acceptance item for a `cpu_idle_update_badge` scenario in `benchmark/app_perf_bench.dart` (`/proc` CPU sampling on a profile build) is left for a follow-up.

Closes #1554

An endless AnimationController.repeat keeps the engine producing a frame at
the display rate for as long as a newer release is pending: an otherwise
idle app burned ~30% of a CPU core (#1554).

The chip now pulses for three breaths when it appears and then settles to
its static colors, so the app is idle again. The pulse runs once per
pending update and starts again only after the badge went away.

Closes #1554
@github-actions github-actions Bot added bug Something isn't working performance Theme parser epic label: performance ui User interface components and widgets P2 Medium priority / Parity & Refactoring labels Oct 15, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit bc4d77d into dev Oct 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P2 Medium priority / Parity & Refactoring performance Theme parser epic label: performance ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant