Skip to content

fix(app): stop animating live readings on every update - #106

Merged
yogeshprasad098 merged 2 commits into
mainfrom
fix/live-number-animation
Nov 26, 2026
Merged

yogeshprasad098 merged 2 commits into
mainfrom
fix/live-number-animation

Conversation

@yogeshprasad098

@yogeshprasad098 yogeshprasad098 commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Refs #90

With the dashboard open, Chargectl used around half a CPU core, in front of other apps and behind them. On Overview the watts, volts, amps and temperature rolled their digits, and the Mac and battery bar eased its width, each time a reading changed. Readings change every second, so these animations almost never stopped, and the digit roll is drawn on the CPU. 0.3.1 fixed the closed window; this fixes the open one.

Live readings now change without animation: the Power and Charger cards, the temperature, the energy list, and the Charger, Mac and Battery figures in the menu bar panel. The charge, the cycle count and settings still roll. rollingNumber takes isLive for cells that hold both kinds of value.

To measure it, a debug build started with --demo --live-readings changes the sample readings every second. CONTRIBUTING says to check CPU this way when changing the dashboard.

Review focus

The Mac and battery bar under the Power card no longer eases to its new width; it jumps. With its 0.6 s ease on every reading, the whole page was laid out again on every frame.

Testing

Tested on an M3 MacBook Air, macOS 27.2.1, Debug build with --demo --live-readings, CPU from ps over 20 s with the Overview window open:

In front Behind Finder
Before 48% 46%
Without rolling digits on live readings 16% 15%
Also without the bar's ease (this PR) 5% 5%
Before, with fixed sample readings 3% 0.4%

A sample of the installed 0.3.1 at 40% showed most of the main thread in CGDrawingLayer.draw drawing RBInterpolatedDisplayListContents, the numeric text transition. ./scripts/check.sh passes.

Not tested: the release build with real readings. I'll measure it once this ships.

  • CHANGELOG.md has an entry under Unreleased saying what a user now sees, or nothing user-visible changed.
  • Docs are updated, or the change needs none.
  • A breaking change has ! in the title and the migration above.

yogeshprasad098 and others added 2 commits November 26, 2026 15:23
The open dashboard held the app at around half a CPU core, in front of
other apps and behind them. On Overview the watts, volts, amps and
temperature rolled their digits, and the Mac and battery bar eased its
width, every time a reading changed. Readings change every second, so
those animations ran almost all the time, and the digit roll is drawn on
the CPU.

Live readings now change without animation; the charge, the cycle count
and settings still roll. A debug build started with --demo
--live-readings varies the sample readings every second, so this can be
measured: 48% CPU before and 5% after with the window open.

Refs #90

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation area: dashboard The Chargectl window and the setup window area: menu bar The menu bar icon and its panel area: ci CI, the check scripts and the build setup labels Nov 26, 2026
@yogeshprasad098
yogeshprasad098 merged commit 8102b74 into main Nov 26, 2026
9 checks passed
@yogeshprasad098
yogeshprasad098 deleted the fix/live-number-animation branch November 26, 2026 23:27
@yogeshprasad098 yogeshprasad098 mentioned this pull request Nov 26, 2026
3 tasks done
yogeshprasad098 added a commit that referenced this pull request Nov 27, 2026
The open dashboard held the app at around half a CPU core, in front of other apps and behind them. On Overview the watts, volts, amps and temperature rolled their digits, and the Mac and battery bar eased its width, every time a reading changed. Readings change every second, so those animations ran almost all the time, and the digit roll is drawn on the CPU.

Live readings now change without animation; the charge, the cycle count and settings still roll. A debug build started with --demo --live-readings varies the sample readings every second, so this can be measured: 48% CPU before and 5% after with the window open.

Refs #90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI, the check scripts and the build setup area: dashboard The Chargectl window and the setup window area: menu bar The menu bar icon and its panel documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant