René's URL Explorer Experiment


Title: Ideas for faster cold compiler start-up · Issue #25658 · microsoft/TypeScript · GitHub

Open Graph Title: Ideas for faster cold compiler start-up · Issue #25658 · microsoft/TypeScript

X Title: Ideas for faster cold compiler start-up · Issue #25658 · microsoft/TypeScript

Description: Background For some users, cold compile times are getting to be a bit long - so much so that it's impacting people's non-watch-mode experience, and giving people a negative perception of the compiler. Compilation is already a hard sell f...

Open Graph Description: Background For some users, cold compile times are getting to be a bit long - so much so that it's impacting people's non-watch-mode experience, and giving people a negative perception of the compil...

X Description: Background For some users, cold compile times are getting to be a bit long - so much so that it's impacting people's non-watch-mode experience, and giving people a negative perception of th...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/25658

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ideas for faster cold compiler start-up","articleBody":"# Background\r\n\r\nFor some users, cold compile times are getting to be a bit long - so much so that it's impacting people's non-watch-mode experience, and [giving people a negative perception of the compiler](https://twitter.com/garybernhardt/status/1007690864909529088).\r\n\r\nCompilation is already a hard sell for JavaScript users. If we can get some speed wins, I think it'd ease a lot of the pain of starting out with TypeScript.\r\n\r\n# Automatic `skipDefaultLibCheck`\r\n\r\n`lib.d.ts` is a pretty big file, and it's only going to grow. Realistically, most people don't ever declare symbols that conflict with the global scope, so we made the `skipDefaultLibCheck` (and also the `skipLibCheck` flags) for faster compilations.\r\n\r\n[We can suggest this flag to users](https://twitter.com/drosenwasser/status/1007721634193477632), but the truth is that it's not discoverable. It's also often misused, so I want to stop recommending it to people. 😄 \r\n\r\nIt'd be interesting to see if we can get the same results of `skipDefaultLibCheck` based on the code users have written. Any program that doesn't contribute a global augmentation, or a declaration in the global scope, doesn't really need to have `lib.d.ts` checked over again.\r\n\r\n@mhegazy and I have discussed this, and it sounds like we have the necessary information after the type-checker undergoes symbol-merging. If no symbols ever get merged outside of lib files, we can make the assumption that `lib` files never need to get checked. But this requires knowing that all lib files have already had symbols merged up front before any other files the compiler is given.\r\n\r\n## Pros\r\n\r\n* Running with `skipDefaultLibCheck` removes anywhere between 400-700ms on my machine from a \"Hello world\" file, so we could expect the same here.\r\n\r\n## Cons\r\n\r\n* We'd have to be careful about our assumptions with this flag.\r\n* Users who edit `lib.d.ts` wouldn't see erroneous changes in a compiler (so we'd likely need a `forceDefaultLibCheck`).\r\n* Ideally, in the absence of edited `lib.d.ts` files, only our team ever needs to run `forceDefaultLibCheck`, reducing the cost for all other TypeScript users.\r\n\r\n# V8 Snapshots\r\n\r\n~3 years ago, the V8 team introduced [custom startup snapshots](https://v8project.blogspot.com/2015/09/custom-startup-snapshots.html). In that post \r\n\r\n> Limitations aside, startup snapshots remain a great way to save time on initialization. We can shave off 100ms from the startup spent on loading the TypeScript compiler in our example above (on a regular desktop computer). We're looking forward to seeing how you might put custom snapshots to use!\r\n\r\nObviously my machine's not the same as that aforementioned desktop, but I'm getting just a bit over 200ms for running `tsc -v`, so we could possibly minimize a decent chunk of our raw startup cost. Maybe @hashseed or @bmeurer would be able to lend some insight for how difficult this would be.\r\n\r\n# Minification\r\n\r\n@RyanCavanaugh and I tried some offhand loading benchmarks with Uglify and managed\r\n\r\n1. to reduce `typescript.js`'s size by about half\r\n2. to reduce import time by about 30ms\r\n\r\nI don't know how impactful 30ms is, but the size reduction sounds appealing.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2018-07-13T23:23:11Z","url":"https://github.com/microsoft/TypeScript/issues/25658"}

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:886eb23e-9cf2-2455-55f0-5b75277a08f0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idADD8:161320:F40D12:1440089:6B01D93E
html-safe-noncec2ba34f94051aa129973db9dcd7fb2a165284faf20b37dfcd410915f4db1c95d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREQ4OjE2MTMyMDpGNDBEMTI6MTQ0MDA4OTo2QjAxRDkzRSIsInZpc2l0b3JfaWQiOiI4ODU0Mjk0ODk4OTI1NDkyNTQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac580a5f0e49cc54f542d6ddecce0feaa8f6db184c0a236a9ca9fed1d62464f75c
hovercard-subject-tagissue:341185768
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/microsoft/TypeScript/25658/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c5868dc2a4bc0ccaa1fa23f0f12a9fc38362378d1db56e0993dac49410124a74/microsoft/TypeScript/issues/25658
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c5868dc2a4bc0ccaa1fa23f0f12a9fc38362378d1db56e0993dac49410124a74/microsoft/TypeScript/issues/25658
og:image:altBackground For some users, cold compile times are getting to be a bit long - so much so that it's impacting people's non-watch-mode experience, and giving people a negative perception of the compil...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/25658#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F25658
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%2Fmicrosoft%2FTypeScript%2Fissues%2F25658
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=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/25658
Reloadhttps://github.com/microsoft/TypeScript/issues/25658
Reloadhttps://github.com/microsoft/TypeScript/issues/25658
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25658
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25658
Ideas for faster cold compiler start-uphttps://github.com/microsoft/TypeScript/issues/25658#top
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jul 13, 2018https://github.com/microsoft/TypeScript/issues/25658#issue-341185768
giving people a negative perception of the compilerhttps://twitter.com/garybernhardt/status/1007690864909529088
We can suggest this flag to usershttps://twitter.com/drosenwasser/status/1007721634193477632
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
custom startup snapshotshttps://v8project.blogspot.com/2015/09/custom-startup-snapshots.html
Yang Guo (@hashseed)https://github.com/hashseed
Benedikt Meurer (@bmeurer)https://github.com/bmeurer
Ryan Cavanaugh (@RyanCavanaugh)https://github.com/RyanCavanaugh
https://github.com/hashseed
Yang Guo (hashseed)https://github.com/hashseed
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-405156437
effortshttps://docs.google.com/document/d/1YEIBdH7ocJfm6PWISKw03szNAgnstA2B3e8PZr_-Gp4/edit
https://github.com/kitsonk
Kitson Kelly (kitsonk)https://github.com/kitsonk
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-405163547
denohttps://github.com/ry/deno
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Meta-IssueAn issue about the team, or the direction of TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Meta-Issue%22
on Jul 16, 2018https://github.com/microsoft/TypeScript/issues/25658#event-1736280408
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Jul 17, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-405462205
Yang Guo (@hashseed)https://github.com/hashseed
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
on Aug 18, 2018https://github.com/microsoft/TypeScript/issues/25658#event-1795760605
https://github.com/tinganho
Tingan Ho (tinganho)https://github.com/tinganho
on Aug 19, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-414125627
https://github.com/hashseed
Yang Guo (hashseed)https://github.com/hashseed
on Aug 19, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-414128418
https://github.com/tinganho
Tingan Ho (tinganho)https://github.com/tinganho
on Aug 19, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-414129018
https://github.com/timocov
Evgeniy Timokhov (timocov)https://github.com/timocov
on Aug 28, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-416746747
TypeStrong/ts-loader#825 (comment)https://github.com/TypeStrong/ts-loader/issues/825#issue-354725524
https://github.com/mweststrate
Michel Weststrate (mweststrate)https://github.com/mweststrate
on Nov 27, 2018https://github.com/microsoft/TypeScript/issues/25658#issuecomment-441880649
https://zeit.co/blog/ncchttps://zeit.co/blog/ncc
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Meta-IssueAn issue about the team, or the direction of TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Meta-Issue%22
on Mar 8, 2019https://github.com/microsoft/TypeScript/issues/25658#event-2188832411
https://github.com/andykais
Andrew Kaiser (andykais)https://github.com/andykais
on Apr 12, 2019https://github.com/microsoft/TypeScript/issues/25658#issuecomment-482437219
https://github.com/TimvdLippe
Tim van der Lippe (TimvdLippe)https://github.com/TimvdLippe
on Jan 31, 2021https://github.com/microsoft/TypeScript/issues/25658#issuecomment-770383276
Yang Guo (@hashseed)https://github.com/hashseed
nodejs/node#17058https://github.com/nodejs/node/issues/17058
nodejs/node#35711https://github.com/nodejs/node/issues/35711
#40721https://github.com/microsoft/TypeScript/issues/40721
https://github.com/hashseed
Yang Guo (hashseed)https://github.com/hashseed
on Feb 1, 2021https://github.com/microsoft/TypeScript/issues/25658#issuecomment-770834668
https://github.com/frank-dspeed
Frank Lemanschik (frank-dspeed)https://github.com/frank-dspeed
on May 26, 2022https://github.com/microsoft/TypeScript/issues/25658#issuecomment-1138877141
https://nodejs.org/en/blog/announcements/v18-release-announce/#build-time-user-land-snapshot-experimentalhttps://nodejs.org/en/blog/announcements/v18-release-announce/#build-time-user-land-snapshot-experimental
https://github.com/kurtextrem
Jacob Groß (kurtextrem)https://github.com/kurtextrem
on May 2, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2090263809
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jun 3, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2146247302
#55830https://github.com/microsoft/TypeScript/pull/55830
#55830 (comment)https://github.com/microsoft/TypeScript/pull/55830#issuecomment-2027789386
Jacob Groß (@kurtextrem)https://github.com/kurtextrem
#55830https://github.com/microsoft/TypeScript/pull/55830
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jun 3, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2146248541
Joyee Cheung (@joyeecheung)https://github.com/joyeecheung
https://github.com/kurtextrem
Jacob Groß (kurtextrem)https://github.com/kurtextrem
on Jul 3, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2205791636
Jake Bailey (@jakebailey)https://github.com/jakebailey
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jul 3, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2206214073
nodejs/node#53639https://github.com/nodejs/node/issues/53639
https://github.com/joyeecheung
Joyee Cheung (joyeecheung)https://github.com/joyeecheung
on Jul 29, 2024https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2256569747
nodejs/node#53639https://github.com/nodejs/node/issues/53639
https://github.com/mjames-c
Michael James (mjames-c)https://github.com/mjames-c
on Feb 24, 2025https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2677220978
Jake Bailey (@jakebailey)https://github.com/jakebailey
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Feb 24, 2025https://github.com/microsoft/TypeScript/issues/25658#issuecomment-2679127578
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/25658
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/25658
Needs ProposalThis issue needs a plan that clarifies the finer details of how it could be implemented.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Proposal%22
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%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.