René's URL Explorer Experiment


Title: perf: stop shipping error-boundary renderer chunks on every published page · Issue #567 · ycode/ycode · GitHub

Open Graph Title: perf: stop shipping error-boundary renderer chunks on every published page · Issue #567 · ycode/ycode

X Title: perf: stop shipping error-boundary renderer chunks on every published page · Issue #567 · ycode/ycode

Description: Summary Every published page still downloads and parses the error boundary's renderer chunks even though no error has occurred. Next injects the client-reference chunks of app/(site)/error.tsx into the initial HTML as errorScripts (

Open Graph Description: Summary Every published page still downloads and parses the error boundary's renderer chunks even though no error has occurred. Next injects the client-reference chunks of app/(site)/error.tsx into...

X Description: Summary Every published page still downloads and parses the error boundary's renderer chunks even though no error has occurred. Next injects the client-reference chunks of app/(site)/error.tsx ...

Opengraph URL: https://github.com/ycode/ycode/issues/567

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"perf: stop shipping error-boundary renderer chunks on every published page","articleBody":"## Summary\n\nEvery published page still downloads and parses the error boundary's renderer chunks even though no error has occurred. Next injects the client-reference chunks of `app/(site)/error.tsx` into the initial HTML as `errorScripts` (`\u003cscript async>`), and one of those chunks is a module-for-module copy of a chunk the page renderer already loads. Follow-up to #548 / #558, found while measuring #551 after release (v1.30.19).\n\n## Evidence (client website homepage, production build)\n\nRSC flight payload, client references:\n\n| ref | source | chunks |\n|---|---|---|\n| `error.tsx` boundary | 6 chunks: `b7dab45d`, `1caf38dc`, `196ccc24`, `5df3feb8`, **`8be92b95`**, `9796c767` |\n| `LayerRendererPublic` / page | 10 chunks incl. `196ccc24`, `5df3feb8`, `9796c767`, **`c5e00107`** |\n\n- `8be92b95` (188 KB raw / 54 KB br) and `c5e00107` (188 KB raw / 53 KB br) contain the same 23 modules; 21 are byte-identical once Turbopack module IDs are masked. Both hold the rich-text / inline-variable code (`ycode-inline-variable`, `dynamicVariable`, `richText`).\n- `1caf38dc` (25 KB raw / 10 KB br) is error-boundary-only and contains `YcodeBadge` plus swiper references.\n- All six are emitted as `\u003cscript async>` in the SSR HTML via `errorScripts`, so they load on first view, not on error.\n- Net cost per page view: **~64 KB compressed, ~213 KB parsed/compiled**, on the mobile critical path before first paint (Lantern counts them against LCP).\n- The pre-release build had the same pair (2 × 52 KB br), so #558 removed the static `LayerRendererPublic` import from the boundary but the `next/dynamic` graph still resolves into a separate copy of the shared modules.\n\n## Likely cause\n\n`ErrorPageContent` is loaded with `next/dynamic` from `error.tsx`, but the modules it shares with the page (`lib/variable-utils`, rich-text helpers, `layer-utils`) are chunked into the error boundary's own group rather than the shared group the renderer uses. Turbopack does not dedupe across the two client-reference entry points, and Next always ships an error boundary's chunks with the page so the fallback can render offline.\n\n## Proposed fix\n\n1. Make the default `error.tsx` self-contained: render a minimal static 500 (no `LayerRendererPublic`, no `YcodeBadge`) so its client reference is ~1–2 KB.\n2. Load the custom 500 page tree only after an error occurs, from inside the boundary (`import()` in an effect), so its chunks never appear in `errorScripts`.\n3. Verify with `next build` + a published page: `errorScripts` should list only the tiny boundary chunk, and no two first-party chunks should share >50% of modules (`cmp` after masking `\\d{5,7}` IDs).\n\nSame check for `app/(site)/ycode/preview/error.tsx` and any `not-found.tsx` boundary — the pre-rendered `not-found` tree also carries a second copy of the site CSS (~230 KiB uncompressed) and is worth a separate look once this lands.\n\n## Out of scope (client side)\n\nThird-party tags (gtag ×2 ≈ 382 KB, Clarity, Tawk) account for all TBT and every long task; 2.7 MB of autoplay MP4 on mobile is bandwidth only and does not gate LCP.\n\nPart of #551 follow-up.\n","author":{"url":"https://github.com/ysamcode","@type":"Person","name":"ysamcode"},"datePublished":"2026-09-18T10:04:24Z","url":"https://github.com/ycode/ycode/issues/567"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:927e01c4-1496-2ae6-4502-7c0ccd131cf4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id97F2:F06EF:3FFA6:5568D:6AFE4129
html-safe-noncea9b36f8c30c2dae625e259d68a74949362c9adde30f65a0ec249d88b8717d3ca
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0YyOkYwNkVGOjNGRkE2OjU1NjhEOjZBRkU0MTI5IiwidmlzaXRvcl9pZCI6IjU4NTYxOTk0MTE4MTM0NjY0MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8b0803ecbd81504ac9380c6109479d5148cf44e9a9c92b6fa6fe6dcb48920f7c
hovercard-subject-tagissue:5498303602
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/ycode/ycode/567/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5068f1486032bd53a6292f1adc92a7193aaedcc71d290696badb0aadf64625d2/ycode/ycode/issues/567
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5068f1486032bd53a6292f1adc92a7193aaedcc71d290696badb0aadf64625d2/ycode/ycode/issues/567
og:image:altSummary Every published page still downloads and parses the error boundary's renderer chunks even though no error has occurred. Next injects the client-reference chunks of app/(site)/error.tsx into...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameysamcode
hostnamegithub.com
expected-hostnamegithub.com
Nonef1a5901e2377b0af2a0b303f9528678f1475d04b9219dca1e993344196eaa07c
turbo-cache-controlno-preview
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-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec4447fdce9ed0f33af959d2b6680d0bc18212a6a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/ycode/ycode/issues/567#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fycode%2Fycode%2Fissues%2F567
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%2Fissues%2F567
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=ycode%2Fycode
Reloadhttps://github.com/ycode/ycode/issues/567
Reloadhttps://github.com/ycode/ycode/issues/567
Reloadhttps://github.com/ycode/ycode/issues/567
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
https://github.com/ycode/ycode
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/567
New issuehttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/567
perf: stop shipping error-boundary renderer chunks on every published pagehttps://github.com/ycode/ycode/issues/567#top
https://github.com/tristan-mouchet
ImprovementImprove existing featurehttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Improvement%22
https://github.com/ysamcode
ysamcodehttps://github.com/ysamcode
on Sep 18, 2026https://github.com/ycode/ycode/issues/567#issue-5498303602
#548https://github.com/ycode/ycode/issues/548
#558https://github.com/ycode/ycode/pull/558
#551https://github.com/ycode/ycode/issues/551
fix: stop shipping duplicate renderer chunk on published pages #558https://github.com/ycode/ycode/pull/558
#551https://github.com/ycode/ycode/issues/551
ysamcodehttps://github.com/ysamcode
on Sep 18, 2026https://github.com/ycode/ycode/issues/567#event-31382264964
ysamcodehttps://github.com/ysamcode
ImprovementImprove existing featurehttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Improvement%22
on Sep 18, 2026https://github.com/ycode/ycode/issues/567#event-31382265808
tristan-mouchethttps://github.com/tristan-mouchet
tristan-mouchethttps://github.com/tristan-mouchet
ysamcodehttps://github.com/ysamcode
on Sep 21, 2026https://github.com/ycode/ycode/issues/567#event-31510519188
tristan-mouchethttps://github.com/tristan-mouchet
completedhttps://github.com/ycode/ycode/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
0ca7dc2https://github.com/ycode/ycode/commit/0ca7dc29e964e6bb77af83045f0c8c13ed24c620
on Sep 21, 2026https://github.com/ycode/ycode/issues/567#event-31513895970
github-actionshttps://github.com/apps/github-actions
on Sep 21, 2026https://github.com/ycode/ycode/issues/567#event-31514676418
perf: defer error page renderer off published pageshttps://github.com/makdone/ycode/commit/0ca7dc29e964e6bb77af83045f0c8c13ed24c620
https://docs.github.com/articles/closing-issues-via-commit-messages
0ca7dc2https://github.com/makdone/ycode/commit/0ca7dc29e964e6bb77af83045f0c8c13ed24c620
Sign up for freehttps://github.com/signup?return_to=https://github.com/ycode/ycode/issues/567
Sign in to commenthttps://github.com/login?return_to=https://github.com/ycode/ycode/issues/567
tristan-mouchethttps://github.com/tristan-mouchet
ImprovementImprove existing featurehttps://github.com/ycode/ycode/issues?q=state%3Aopen%20label%3A%22Improvement%22
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.