Skip to content

Speed up long-article highlighting and repair library search and keyboard focus - #354

Merged
callumalpass merged 1 commit into
mainfrom
sprint-w5-reader-perf-reliability
Nov 28, 2026
Merged

callumalpass merged 1 commit into
mainfrom
sprint-w5-reader-perf-reliability

Conversation

@callumalpass

Copy link
Copy Markdown
Member

Reader was normalizing a long article once per quote even when all annotations searched the same root. Reuse the existing prepared matcher and skip the obsolete margin-marker layout when replacing annotations.

Numeric field filters now compare stored values without formatting them for display. Annotation search resolves filename and path links through the SDK and preserves the first three passages per owner across pages. Virtualized Home/End navigation focuses the destination when its row mounts. A recovered library read clears its error banner, and bare snake_case errors use the caller’s recovery message.

Median milliseconds After #352 This change
Chromium, 50 quote-only highlights 73.6 3.8
Chromium, 200 quote-only highlights 286.9 8.5
Vitest, numeric field filter on 10,000 sources 9.09 1.78
Vitest, 10,000 annotation search hits 5.77 5.37

Each median uses seven samples after warm-up. The local browser fixture uses 1,000 paragraphs and an intercepted collection. It checks the h1 title, h2 “Abstract”, h3 and paragraph in the CSS Highlight registry after saving through the toolbar and reloading. At 360, 768 and 1280 px it also checks keyboard focus, bounded row counts, overflow and axe. The built shell passed offline and reconnected reloads on loopback. See docs/reader-performance.md for reproduction commands, import timings and measurement boundaries.

@callumalpass
callumalpass merged commit d739e84 into main Nov 28, 2026
3 checks passed
@callumalpass
callumalpass deleted the sprint-w5-reader-perf-reliability branch November 28, 2026 08:21
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