Skip to content

perf(web): defer off-screen station card rendering - #320

Merged
pitill0 merged 1 commit into
mainfrom
perf/web-station-card-visibility
Oct 31, 2026
Merged

pitill0 merged 1 commit into
mainfrom
perf/web-station-card-visibility

Conversation

@pitill0

@pitill0 pitill0 commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Station search results render every card immediately, including cards outside the viewport. Defer off-screen layout and painting with content-visibility: auto and responsive intrinsic height estimates.

Keep cards and search fields within their panels, center the version footer across the shell, and attach the sidebar collapse control to the sticky menu region so it remains accessible while scrolling.

When a results list receives focus, render the full list to stabilize keyboard navigation and focus scrolling. Remove the obsolete fixed-grid assertion from the search debug test.

Performance

Synthetic benchmarks with 50 stations and 4× CPU throttling showed lower median initial rendering time:

Viewport Baseline Updated
Desktop 15.35 ms 9.69 ms
Mobile 17.88 ms 6.63 ms
Mobile with larger text 19.66 ms 8.34 ms

Rendering work is deferred: cumulative time after scrolling and focusing the list was higher than baseline.

Validation

  • 64/64 browser layout and interaction cases passed, plus manual desktop and mobile verification.
  • Full suite: 1907 passed, 8 skipped.
  • Ruff format/lint, compileall, Mypy, syntax checks for all 45 web JavaScript files, pip check, pip-audit, Bandit and diff checks passed.

Keep search fields and station cards within responsive panels, center the version footer, and keep the sidebar toggle attached while scrolling.

Render a focused results list fully to keep keyboard navigation stable. Remove the obsolete fixed-grid assertion from the search debug test.
@pitill0 pitill0 self-assigned this Oct 31, 2026
@pitill0
pitill0 merged commit e20f9bf into main Oct 31, 2026
7 checks 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.

1 participant