Skip to content

perf(desktop): stop continuous animation in the compact notch - #1374

Merged
nixuuu merged 1 commit into
devfrom
perf/optimize-canopy-cpu-usage
Nov 27, 2026
Merged

nixuuu merged 1 commit into
devfrom
perf/optimize-canopy-cpu-usage

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 27, 2026

Copy link
Copy Markdown
Member

Change

  • Pause the working ring in the collapsed Activity notch and run the label shimmer only while the panel is visible. Opening the panel restores both animations when motion is enabled.
  • Extend the native Electron fixture to cover the running animations before and after expansion. Fix a deadlock in the fixture by installing its fade observer before waiting for the probe result.
  • Update the Desktop documentation.

Refs: #1285
Refs: #1329

Verification

  • In an isolated Electron 45.4.1 overlay on macOS with four working rows, the median combined renderer and GPU process CPU usage dropped from about 24% of one core to below 0.5%. Measured both revisions twice with macOS top. The measurement covers the overlay.
  • The focused Electron integration test passed on macOS with normal motion and in a separate run with reduced motion emulated. The new assertion failed against the previous styles because both animations ran in the collapsed overlay.
  • Desktop typecheck, lint on the edited TypeScript files and git diff --check passed locally. Windows and repository-wide checks run in CI.

@nixuuu
nixuuu enabled auto-merge (squash) November 27, 2026 22:32
@nixuuu
nixuuu merged commit 9e653c8 into dev Nov 27, 2026
24 checks passed
@nixuuu
nixuuu deleted the perf/optimize-canopy-cpu-usage branch November 27, 2026 22:38
nixuuu added a commit that referenced this pull request Nov 28, 2026
…1382)

The compact Activity notch now shows a smooth, one-second rotation while
the summary indicates work in progress. Chromium can composite the arc's
transform independently. Hidden row labels stay idle, and the ring stops
when another status takes priority or the user enables reduced motion.

Fixes: #1374

## Verification

- Exercised the overlay in Chromium on Linux with four working rows,
including expansion, collapse, status changes and reduced motion. A
two-second trace recorded 120 frames with no layout or paint events
during steady rotation.
- In the same setup, combined renderer and GPU process CPU time was
about 4% of one core, compared with 8% when reproducing the ring and
hidden label animations from before #1374. The static overlay measured
near zero. Native macOS CPU usage still needs measurement.
- Updated the Electron fixture to check which animations run and that
the working arc rotates linearly. Native macOS and Windows integration
runs are left to CI.
- Formatting, lint on the edited TypeScript files and the diff
whitespace check passed locally.
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