René's URL Explorer Experiment


Title: perf(site): stop loading monaco on every page by mafredri · Pull Request #31367 · coder/coder · GitHub

Open Graph Title: perf(site): stop loading monaco on every page by mafredri · Pull Request #31367 · coder/coder

X Title: perf(site): stop loading monaco on every page by mafredri · Pull Request #31367 · coder/coder

Description: Base: #31366 (perf/chat-focus-within). Fourth of five stacked fixes. Every page imports and executes monaco's 4.5 MB chunk, its stylesheet with 18 A:focus-within B rules, and the 807 KB emoji-picker chunk. Vite 8 codeSplitting.groups also take the modules their matches import that no earlier group took: the monaco group, listed first, takes React and Vite's preload helper, which the entry imports, and the emoji-picker group (/frimousse|emojibase-data/), listed ahead of radix-ui, takes React's JSX runtime. This PR deletes the monaco, xterm and emoji-picker groups, so index.html loads neither chunk. The three libraries stay lazy but lose stable vendor chunk names; monaco now ships in editor.api-*.js and editor-*.css. Builds below predate #31663 and have monaco 0.55.1, with 4 such rules. Production builds of the pre-rebase versions of 30d26d37dd (base) and eff8991039 (this PR): the JS index.html loads up front falls from 6,987,293 to 2,794,832 bytes without monaco's chunk and stylesheet, and neither build has a static import cycle between chunks. On the pre-rebase version of eff8991039, the template files, version and editor pages rendered monaco without errors, loaded directly in Chromium and WebKit and after in-app navigation in Chromium. Vite never removes a lazy chunk's stylesheet, so after one of those pages loads, monaco's rules apply until reload. #31278 bench (a tool, not for merging) on the pre-rebase version of c5a25907e6 (base) and this PR on it, before later commits, which keep the selector kinds: 2 long chats, 140k nodes, 3 alternating runs; this measures the whole chunk, not its rules alone, and this PR does not explain the remaining 205 to 242 ms of WebKit focus time. idle focus, pointer p50 base this PR WebKit 574 to 670 ms 205 to 242 ms Chromium (within noise) 10 to 11 ms 10 to 13 ms 🤖 This PR was created with the help of Coder Agents, and will be reviewed by a human. 🏂🏻

Open Graph Description: Base: #31366 (perf/chat-focus-within). Fourth of five stacked fixes. Every page imports and executes monaco's 4.5 MB chunk, its stylesheet with 18 A:focus-within B rules, and the 807 KB emoji-p...

X Description: Base: #31366 (perf/chat-focus-within). Fourth of five stacked fixes. Every page imports and executes monaco's 4.5 MB chunk, its stylesheet with 18 A:focus-within B rules, and the 807 KB emo...

Opengraph URL: https://github.com/coder/coder/pull/31367

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:50e3accf-5dbc-d007-5941-2fef15e420d7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDFE4:2AAD2E:2377A99:2F56361:6B01981B
html-safe-nonce852a80dd25777589f3883b2045ccf0ad3ea0f9eebc56a9a6744d70016f37b0a6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkU0OjJBQUQyRToyMzc3QTk5OjJGNTYzNjE6NkIwMTk4MUIiLCJ2aXNpdG9yX2lkIjoiMjQyMDMwMDYxMjM4NzMxMzY5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac02791b61a55ec3fdafd5370762b1549ec655300112d256b77fe94c9d0e893e50
hovercard-subject-tagpull_request:5038578792
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/coder/coder/pull/31367/files
twitter:imagehttps://avatars.githubusercontent.com/u/147409?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/147409?s=400&v=4
og:image:altBase: #31366 (perf/chat-focus-within). Fourth of five stacked fixes. Every page imports and executes monaco's 4.5 MB chunk, its stylesheet with 18 A:focus-within B rules, and the 807 KB emoji-p...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/coder/pull/31367/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fpull%2F31367%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%2Fcoder%2Fcoder%2Fpull%2F31367%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=coder%2Fcoder
Reloadhttps://github.com/coder/coder/pull/31367/files
Reloadhttps://github.com/coder/coder/pull/31367/files
Reloadhttps://github.com/coder/coder/pull/31367/files
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcoder%2Fissues%2Fnew%2Fchoose
mafredrihttps://github.com/mafredri
perf/chat-focus-withinhttps://github.com/coder/coder/tree/perf/chat-focus-within
perf/site-monaco-chunkhttps://github.com/coder/coder/tree/perf/site-monaco-chunk
Conversation 27 https://github.com/coder/coder/pull/31367
Commits 5 https://github.com/coder/coder/pull/31367/commits
Checks 30 https://github.com/coder/coder/pull/31367/checks
Files changed 1 https://github.com/coder/coder/pull/31367/files
perf(site): stop loading monaco on every page https://github.com/coder/coder/pull/31367/files#top
Show all changes 5 commits https://github.com/coder/coder/pull/31367/files
a5e693b perf(site): stop loading monaco on every page mafredri Oct 26, 2026 https://github.com/coder/coder/pull/31367/commits/a5e693bc8c6d733c51ba9f195feb1f004726ec37
caa08fd perf(site): drop the chunk groups for lazily loaded libraries mafredri Oct 27, 2026 https://github.com/coder/coder/pull/31367/commits/caa08fd76c58eb533569332ed3b08f43459ef30f
99783c6 docs(site): state the chunk group rationale as a condition mafredri Oct 27, 2026 https://github.com/coder/coder/pull/31367/commits/99783c681e40e335f545b5b638b3f71211a4bed4
7d80932 docs(site): name the preload helper in the chunk group rationale mafredri Oct 27, 2026 https://github.com/coder/coder/pull/31367/commits/7d80932e63fb67851d11ac1c4d08092581e14f7d
eff8991 docs(site): name only the chunk groups that load on every page mafredri Oct 27, 2026 https://github.com/coder/coder/pull/31367/commits/eff8991039eeac3f056b00b3cea73a740e4c306a
Clear filters https://github.com/coder/coder/pull/31367/files
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
site/vite.config.mtshttps://github.com/coder/coder/pull/31367/files#diff-d79152349246f1d547000e429eeafceab9f97433f7507179ae1485bd25f9b225
View file https://github.com/coder/coder/blob/eff8991039eeac3f056b00b3cea73a740e4c306a/site/vite.config.mts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/coder/pull/31367/{{ revealButtonHref }}
https://github.com/coder/coder/pull/31367/files#diff-d79152349246f1d547000e429eeafceab9f97433f7507179ae1485bd25f9b225
coder-agents-reviewhttps://github.com/apps/coder-agents-review
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4393661194
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
mafredrihttps://github.com/mafredri
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4393895118
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
8204a25https://github.com/coder/coder/commit/8204a25ee052fff7e665c877adc5ade2d7a57137
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
coder-agents-reviewhttps://github.com/apps/coder-agents-review
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4393956375
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
coder-agents-reviewhttps://github.com/apps/coder-agents-review
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4392521322
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#31278https://github.com/coder/coder/pull/31278
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
mafredrihttps://github.com/mafredri
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4393506821
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
coder-agents-reviewhttps://github.com/apps/coder-agents-review
Oct 27, 2026https://github.com/coder/coder/pull/31367/files#r4393662124
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
https://github.com/coder/coder/pull/31367/files#diff-d79152349246f1d547000e429eeafceab9f97433f7507179ae1485bd25f9b225
Please reload this pagehttps://github.com/coder/coder/pull/31367/files
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.