Skip to content

Skip drawing the clock outline when it's invisible - #164

Merged
danielchalmers merged 1 commit into
masterfrom
claude/skip-invisible-outline
Sep 22, 2026
Merged

danielchalmers merged 1 commit into
masterfrom
claude/skip-invisible-outline

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

With a solid background (the default), the outline stroke is transparent, but every redraw still built a clip geometry with Geometry.Combine and stroked the text with it. This skips the outline when it can't be seen, and builds the clip only when it's actually drawn.

Measured

  • Idle CPU of the real exe, side by side for 3 minutes: 4.56 ms per second before, 2.67 after (about 40% less).
  • 6,000 in-process text updates: 22.9 s / 26.8 s of CPU before, 13.1 s / 17.4 s after (two runs each).

Unchanged output
Rendered the clock with both builds and diffed the PNGs: 0 differing pixels with a background, with a thin outline, and with a thick outline.

With a solid background (the default) the outline stroke is transparent, but every redraw still combined a clip geometry and stroked the text. Skipping it cuts the clock's idle CPU by about 40% (4.6 to 2.7 ms per second measured live) with pixel-identical output in background and outline modes.
@github-actions github-actions Bot added the enhancement New feature or request label Sep 22, 2026
@danielchalmers
danielchalmers merged commit f12e21f into master Sep 22, 2026
5 checks passed
@danielchalmers
danielchalmers deleted the claude/skip-invisible-outline branch September 22, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant