Lazy load CWV distribution histogram on user click - #1328
Open
max-ostapenko wants to merge 2 commits into
Open
max-ostapenko wants to merge 2 commits into
max-ostapenko wants to merge 2 commits into
Conversation
max-ostapenko
added this pull request to stack #1329
September 13, 2026 07:14
max-ostapenko
force-pushed
the
courageous-galliform
branch
from
September 13, 2026 07:18
1d7c7d9 to
1537d0b
Compare
tunetheweb
approved these changes
Sep 13, 2026
max-ostapenko
force-pushed
the
courageous-galliform
branch
4 times, most recently
from
September 14, 2026 18:35
a230c9d to
18f0bff
Compare
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
max-ostapenko
force-pushed
the
courageous-galliform
branch
from
September 14, 2026 19:20
18f0bff to
280c4c7
Compare
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
/v1/cwv-distributionendpoint queries BigQuery directly on the backend and is costly to execute on every page load. Because the histogram chart in the tech report is collapsed by default, this PR optimizes data loading to only fetch when requested by the user.Changes
#cwv-distribution-btn).#submit-form), append#section-cwv_distributionto the URL so the section remains open after reload.isLoadingstate and URL tracking (getUrl()) to prevent duplicate in-flight requests between date updates and toggle events.Verification
Verified in browser via dev server (
http://localhost:8080/reports/techreport/tech?tech=WordPress):/v1/cwv-distribution.