Skip to content

Optimize recurring rolls and prepare 0.4.3 - #33

Merged
KickNext merged 2 commits into
mainfrom
codex/renderer-performance-experiments
Jul 20, 2026
Merged

Optimize recurring rolls and prepare 0.4.3#33
KickNext merged 2 commits into
mainfrom
codex/renderer-performance-experiments

Conversation

@KickNext

@KickNext KickNext commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What changed

  • cache up to four recent measured frames using the complete layout identity
  • reuse settled and recurring target measurements instead of measuring both sides of every roll
  • expand outgoing opacity-layer bounds to preserve vertical glyph bleed
  • add focused regressions for measurement reuse, invalidation, and animated glyph clipping
  • bump the package to 0.4.3 and document the release
  • re-record the README hero from the current 0.4.3 example at 1280x720 and 60 fps

Why

Repeated TextPainter measurement caused transition-start UI-thread spikes, especially across recurring labels. Separately, the outgoing fade layer used the nominal line height even though the rolling slot allowed vertical bleed, so accents and descenders could be clipped during animation.

Performance

Across the macOS profile matrix, UI p99 improved by roughly 21–29% for the 96/192 stress workloads. Missed raster-frame count remained zero. The original macOS showcase was rebuilt and visually accepted without layout or animation regressions.

Preview

The refreshed WebP is a fresh render of the 0.4.3 example, not a conversion of the previous recording. It contains 1,542 opaque frames over 25.7 seconds at 60 fps and loops indefinitely. Sampled version and transition frames were visually checked for the vertical clipping regression.

Validation

  • flutter analyze
  • flutter test (102 tests)
  • cd example && flutter analyze
  • cd example && flutter test (23 tests)
  • two final macOS profile benchmark runs
  • original macOS example visual smoke
  • deterministic hero render: 1,542 frames, 25.7 seconds, 60 fps
  • dart pub publish --dry-run (0 warnings)

Release

Merging this PR does not publish the package. After the merge and a green main CI run, pushing v0.4.3 on the resulting origin/main commit will trigger the publish workflow.

@KickNext
KickNext merged commit e6a7a05 into main Jul 20, 2026
1 check passed
@KickNext
KickNext deleted the codex/renderer-performance-experiments branch July 20, 2026 19:28
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