perf(layout): batch layout reads (1.8.1) #2

Merged
nthxuyen merged 2 commits from perf/batch-layout-reads into main 2026-10-26 14:01:47 +01:00
Owner

Includes the unmerged 1.8.0 commit (fit text to card, tagged v1.8.0) plus 1.8.1: text fit, truncation detection and marquee measurement read before they write, and font-triggered refits coalesce per frame.

Measured on MCA (marquee mode, PSI desktop): forced reflow ~740 ms → ~190 ms; all 82 card clamps and both marquee timings identical before and after. Swiper mode at 414 px checked, no console errors.

Tagged v1.8.1, released with pkg_google_reviews-1.8.1.zip. Installed on MCA 2026-10-26.

https://claude.ai/code/session_012Hw45Q1YnrVg6zeRu3MXcT

Includes the unmerged 1.8.0 commit (fit text to card, tagged v1.8.0) plus 1.8.1: text fit, truncation detection and marquee measurement read before they write, and font-triggered refits coalesce per frame. Measured on MCA (marquee mode, PSI desktop): forced reflow ~740 ms → ~190 ms; all 82 card clamps and both marquee timings identical before and after. Swiper mode at 414 px checked, no console errors. Tagged v1.8.1, released with pkg_google_reviews-1.8.1.zip. Installed on MCA 2026-10-26. https://claude.ai/code/session_012Hw45Q1YnrVg6zeRu3MXcT
New "Fit to card" choice for Review Text Lines: each card shows as many
whole lines of review text as its fixed height leaves after the header,
so a long author name can wrap without pushing content out of the card.
Re-fits on load, after web fonts load and on resize, then re-detects
truncated cards for the review detail panel.

Claude-Session: https://claude.ai/code/session_01ST8uT93K871iTQ7hhsdZvx
Each pass interleaved a style write with the next card's measurement,
forcing one layout per card; with marquee copies a page measured 82
cards on every font event. Reads now run before writes, and refits
coalesce into one per animation frame. Forced reflow dropped from
~740ms to ~190ms on a desktop PSI run; output is unchanged.

Bump to 1.8.1.

Claude-Session: https://claude.ai/code/session_012Hw45Q1YnrVg6zeRu3MXcT
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nthxuyen/review-module!2
No description provided.