René's URL Explorer Experiment


Title: perf: make published pages lighter by trimming layer data by ysamcode · Pull Request #687 · ycode/ycode · GitHub

Open Graph Title: perf: make published pages lighter by trimming layer data by ysamcode · Pull Request #687 · ycode/ycode

X Title: perf: make published pages lighter by trimming layer data by ysamcode · Pull Request #687 · ycode/ycode

Description: Summary Published pages ship the layer tree a second time inside the RSC payload, and part of that tree is data the public renderer never reads. This removes those fields before the tree crosses the client boundary. Part of #685 (step 1, the quick trims). The issue estimates about 12% of the document on its sample homepage and 5–10% on the other sites it measured. Steps 2 and 3 are not included. Measurements Production build (next build + next start), homepage of a template with 15 interaction lists and 5 collection lists. The template has no components, so the _masterComponentId and componentOverrides trims are not exercised here. Homepage Before After Saved Document, clean build 167,112 B 154,758 B 12,354 B (7.4%) Document, rebuild with existing .next cache 162,385 B 151,447 B 10,938 B (6.7%) Flight payload, clean build 112,099 B 99,745 B 12,354 B (11.0%) Document gzipped, clean build 32,129 B 31,245 B 884 B (2.8%) Rendered markup is byte-identical before and after (53,416 B) The 15 interaction lists reaching the client are identical apart from Flight back-reference paths The saving comes from the flat animation list: Flight already sent each interaction list once and referenced it from the second tree, so what goes away is the skeleton of ancestor layers A page without interactions or components (the 404 page) is unchanged Changes Drop _masterComponentId from layers sent to the client: translations are baked in on the server, and the client only receives page/folder slug rows Drop componentOverrides and interactions from the rendered tree: overrides are applied on the server, and interactions reach the client through AnimationInitializer Send AnimationInitializer a flat list of the layers with interactions or settings.hidden, instead of the full tree skeleton Keep interactions and componentOverrides on the item templates of filterable and load-more collections: AnimationInitializer rebuilds injected items from those templates, and the filter/load-more API scans overrides for assets Leave the top-level hidden flag in place (open question in the issue): nothing in the repo writes it, but findLcpTextFont reads it Preview pages are unchanged; they still receive the full tree. Test plan Publish a large page and compare document and Flight size before and after with the commands from #685 Confirm the rendered markup of that page is unchanged Check load, scroll-into-view, hover and click animations, including a mobile menu toggle Check a hidden layer revealed by an interaction, and one with "Keep in HTML when hidden", across a breakpoint resize On a filterable collection and a load-more collection, confirm injected items render images from component overrides and still animate On a non-default locale, confirm component text, image alt text and translated media still render translated Check a component embedded in rich text still animates

Open Graph Description: Summary Published pages ship the layer tree a second time inside the RSC payload, and part of that tree is data the public renderer never reads. This removes those fields before the tree crosses th...

X Description: Summary Published pages ship the layer tree a second time inside the RSC payload, and part of that tree is data the public renderer never reads. This removes those fields before the tree crosses th...

Opengraph URL: https://github.com/ycode/ycode/pull/687

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:058f9e9f-9949-9aa5-7e03-360c9432b597
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id855E:1127A8:236A73:2E5EDD:6AFE597E
html-safe-nonce135f842413edb0e99c7fa10eb32e69f03eb951cb199e081d87f1a2a860d858c7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTVFOjExMjdBODoyMzZBNzM6MkU1RUREOjZBRkU1OTdFIiwidmlzaXRvcl9pZCI6IjEwMTExOTEzOTk1NjQ4NTk3NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac51f7f191bd6e6bb44d036e55561c08a307ba0cbc36f2d7e5ebc9d1c85d52851c
hovercard-subject-tagpull_request:5353986994
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/ycode/ycode/pull/687/files
twitter:imagehttps://avatars.githubusercontent.com/u/7631193?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7631193?s=400&v=4
og:image:altSummary Published pages ship the layer tree a second time inside the RSC payload, and part of that tree is data the public renderer never reads. This removes those fields before the tree crosses th...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/ycode/ycode git https://github.com/ycode/ycode.git
octolytics-dimension-user_id65892203
octolytics-dimension-user_loginycode
octolytics-dimension-repository_id1165452593
octolytics-dimension-repository_nwoycode/ycode
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1165452593
octolytics-dimension-repository_network_root_nwoycode/ycode
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/ycode/ycode/pull/687/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fpull%2F687%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fpull%2F687%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/pull/687/files
Reloadhttps://github.com/ycode/ycode/pull/687/files
Reloadhttps://github.com/ycode/ycode/pull/687/files
ycodehttps://github.com/ycode
ycodehttps://github.com/ycode/ycode
Codehttps://github.com/ycode/ycode
Issues7 (7)https://github.com/ycode/ycode/issues
Pull requests1 (1)https://github.com/ycode/ycode/pulls
Discussionshttps://github.com/ycode/ycode/discussions
Actionshttps://github.com/ycode/ycode/actions
Projectshttps://github.com/ycode/ycode/projects
Security and quality1 (1)https://github.com/ycode/ycode/security
Insightshttps://github.com/ycode/ycode/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fycode%2Fycode%2Fissues%2Fnew%2Fchoose
ysamcodehttps://github.com/ysamcode
develophttps://github.com/ycode/ycode/tree/develop
perf/trim-published-layer-payloadhttps://github.com/ycode/ycode/tree/perf/trim-published-layer-payload
Conversation 0 https://github.com/ycode/ycode/pull/687
Commits 1 https://github.com/ycode/ycode/pull/687/commits
Checks 0 https://github.com/ycode/ycode/pull/687/checks
Files changed https://github.com/ycode/ycode/pull/687/files
Please reload this pagehttps://github.com/ycode/ycode/pull/687/files
perf: make published pages lighter by trimming layer data https://github.com/ycode/ycode/pull/687/files#top
Show all changes 1 commit https://github.com/ycode/ycode/pull/687/files
aac10fe perf: trim layer data sent to published pages ysamcode Nov 17, 2026 https://github.com/ycode/ycode/pull/687/commits/aac10fe7eb2fac40cb71f5b988f733efc961b3f9
Clear filters https://github.com/ycode/ycode/pull/687/files
Please reload this pagehttps://github.com/ycode/ycode/pull/687/files
Please reload this pagehttps://github.com/ycode/ycode/pull/687/files
https://github.com/ycode/ycode/blob/develop/.github/CODEOWNERS#L1
components/PageRenderer.tsxhttps://github.com/ycode/ycode/pull/687/files#diff-fd744ab1e8621b1ead61c31be2c1ee564e0ec2f132090b9347bf922e9200e583
View file https://github.com/ycode/ycode/blob/aac10fe7eb2fac40cb71f5b988f733efc961b3f9/components/PageRenderer.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/ycode/ycode/pull/687/{{ revealButtonHref }}
https://github.com/ycode/ycode/pull/687/files#diff-fd744ab1e8621b1ead61c31be2c1ee564e0ec2f132090b9347bf922e9200e583
https://github.com/ycode/ycode/pull/687/files#diff-fd744ab1e8621b1ead61c31be2c1ee564e0ec2f132090b9347bf922e9200e583
https://github.com/ycode/ycode/pull/687/files#diff-fd744ab1e8621b1ead61c31be2c1ee564e0ec2f132090b9347bf922e9200e583
https://github.com/ycode/ycode/pull/687/files#diff-fd744ab1e8621b1ead61c31be2c1ee564e0ec2f132090b9347bf922e9200e583
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.