Skip to content

v31: long worksheets no longer crawl on Mac (Retina) screens - #32

Merged
BPMData merged 2 commits into
mainfrom
claude/overlay-tall-canvas-speed
Oct 26, 2026
Merged

BPMData merged 2 commits into
mainfrom
claude/overlay-tall-canvas-speed

Conversation

@BPMData

@BPMData BPMData commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Fixes #31

What was wrong: the overlay drew ink on one canvas as tall as the whole worksheet. On the MacBook's 2× (Retina) screen, the Resume Day 2 packet made that canvas 2940 × 21,888 pixels. Chrome can only give a canvas up to 16,384 pixels tall to the graphics chip; past that it falls back to the main processor, and every pen move took ~110 ms (about 9 frames a second). The lab HPs have 1× screens, so the same canvas was 10,944 px tall — under the limit, and smooth.

Measured in Chrome at 2×: a canvas exactly 16,384 px tall drew at 60 fps; 16,385 px dropped right away. The highlighter's blend mode made no difference.

The fix: the canvas is now a band about three screens tall that follows the scrolling, and redraws when you scroll near its edge (or before a stroke starts, after a big jump). It's capped under the graphics-chip limit, so ink stays full sharpness.

Checked on the reported worksheet (headless Chrome):

  • Drawing at 2×: ~9 fps → 60 fps. At 1×: 60 fps before and after.
  • Ink drawn, scrolled 6,000 px away, and scrolled back still shows in place; drawing right after a jump lands correctly.
  • Saved ink coordinates are identical to the old overlay's, at 100% and zoomed in — existing ink lines up.
  • Clear page and Save PDF use the same page positions as before.

To get it into a worksheet: open the _board.html file in OverBoard again — it upgrades the overlay to v31 and keeps the ink saved inside it.

Only the HTML overlay changed; the PDF app already uses one canvas per page, so it never hit this.

🤖 Generated with Claude Code

BPMData and others added 2 commits October 26, 2026 10:46
The overlay drew ink on one canvas as tall as the whole worksheet. On a
2x screen a 20-page worksheet made that canvas about 22,000 pixels tall.
Chrome can only hand a canvas up to 16,384 pixels to the graphics chip;
past that it draws with the main processor, and each pen move took about
a tenth of a second. The lab's 1x screens stayed under the limit, which
is why the same file was fine there.

Now the canvas is a band about three screens tall that follows the
scrolling and redraws when it moves. Ink is saved in the same place as
before, so existing ink lines up. Measured on the reported worksheet:
drawing went from about 9 to 60 frames a second on a 2x screen.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@BPMData BPMData changed the title v30: long worksheets no longer crawl on Mac (Retina) screens v31: long worksheets no longer crawl on Mac (Retina) screens Oct 26, 2026
@BPMData
BPMData merged commit 5ad7a28 into main Oct 26, 2026
1 check passed
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.

Board report: SMART · gx · macOS 15.3 · Chrome 156

1 participant