Skip to content

perf(website): drop unused landing scroll handler - #1364

Merged
julioest merged 1 commit into
cppalliance:developfrom
julioest:perf/landing-scroll-listener
Oct 30, 2026
Merged

julioest merged 1 commit into
cppalliance:developfrom
julioest:perf/landing-scroll-listener

Conversation

@julioest

@julioest julioest commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Removes the landing page's scroll handler. It wrote six custom properties (--x1..--y3) to :root on every scroll event, but nothing reads them anymore. The background they used to move is gone, so each event made the browser recalculate styles for the whole page for nothing. Someone on r/cpp reported it as stutter while scrolling.

  • Remove the scroll listener and the DOMContentLoaded script that set the same properties
  • Remove the unused declarations in docs/website/styles.css and docs/ui/src/css/vars.css

Fixes #1347

Testing

Headless Chromium at 1440×900, scrolling down to scrollY 7200 in 120 wheel steps:

Before After
:root style writes 720 0
Style recalcs 121 2
Recalc time 434 ms 1.1 ms

I haven't profiled it in a real browser on a machine that stutters. If it still stutters, check the backdrop-filter: blur(10px) rules on fixed and sticky elements in styles.css next.

I edited docs/website/index.html by hand to match the template, as in #1354. The next render.js run should give the same output.

The handler wrote six custom properties to :root on every
scroll event, forcing a full style recalc. Nothing reads them.

Fixes cppalliance#1347
@julioest julioest added the perf Performance and memory label Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Warnings

Warning

Commits look like feature/fix work, but the PR only changes docs. Double-check commit types.

🧾 Changes by Scope

Scope Lines Δ% Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
📄 Docs 100% 104 - 104 4 - 4 - -
Total 100% 104 - 104 4 - 4 - -

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • docs/website/index.html (Docs): 44 lines Δ (+0 / -44)
  • docs/website/index.html.hbs (Docs): 44 lines Δ (+0 / -44)
  • docs/ui/src/css/vars.css (Docs): 8 lines Δ (+0 / -8)

Generated by 🚫 dangerJS against 288e7bd

@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.21%. Comparing base (9faf2d7) to head (288e7bd).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1364   +/-   ##
========================================
  Coverage    83.21%   83.21%           
========================================
  Files           35       35           
  Lines         3670     3670           
  Branches       845      845           
========================================
  Hits          3054     3054           
  Misses         410      410           
  Partials       206      206           
Flag Coverage Δ
bootstrap 83.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://1364.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-10-22 00:09:22 UTC

@julioest
julioest added this pull request to the merge queue Oct 30, 2026
Merged via the queue into cppalliance:develop with commit 6f92577 Oct 30, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf Performance and memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

website: drop scroll listener on landing page

2 participants