René's URL Explorer Experiment


Title: Takes a while with high memory to calculate highly recursive types with intersections · Issue #20558 · microsoft/TypeScript · GitHub

Open Graph Title: Takes a while with high memory to calculate highly recursive types with intersections · Issue #20558 · microsoft/TypeScript

X Title: Takes a while with high memory to calculate highly recursive types with intersections · Issue #20558 · microsoft/TypeScript

Description: TypeScript Version: 2.6.2 Code Apologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: this does not require a config. interface Conte...

Open Graph Description: TypeScript Version: 2.6.2 Code Apologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: this do...

X Description: TypeScript Version: 2.6.2 Code Apologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: thi...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Takes a while with high memory to calculate highly recursive types with intersections","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  2.6.2\r\n\r\n**Code**\r\n\r\nApologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: this does not require a config.\r\n\r\n```ts\r\ninterface Context\u003cP, O> {\r\n    createV(this: this & Context\u003cP, O & {raw: true}>, attrs: P): Context\u003cP, O>;\r\n    createRC(this: this & Context\u003cP, O & {raw: true}>, attrs: P, ref: (elem: P) => any): Context\u003cP, O>;\r\n\r\n    simpleV(this: this & Context\u003cP, O & {raw: true}>, attrs: P): void;\r\n    simpleRC(this: this & Context\u003cP, O & {raw: true}>, attrs: P, ref: (elem: P) => any): void;\r\n\r\n    add(this: this & Context\u003cP, O & {text: true}>): void;\r\n    raw(this: this & Context\u003cP, O & {raw: true}>, elem: P): void;\r\n\r\n    invokeC\u003cC>(\r\n        tag: Component\u003cobject, P, O>,\r\n        children: (r: Context\u003cP, O>, context: C) => void,\r\n        context: C\r\n    ): void;\r\n    invokeAC\u003cA extends object, C>(\r\n        tag: Component\u003cA, P, O>, attrs: A,\r\n        children: (r: Context\u003cP, O>, context: C) => void,\r\n        context: C\r\n    ): void;\r\n}\r\n\r\ninterface TopContext\u003cP, O> extends Context\u003cP, O> {\r\n    hasOption\u003cK extends keyof O>(key: K): this is (this & TopContext\u003cP, {[P in K]: O[P]}>);\r\n}\r\n\r\ntype Component\u003cA extends object, P, O> = \u003cC>(\r\n    attrs: A, r: TopContext\u003cP, O>,\r\n    children: (r: Context\u003cP, O>, context: C) => void,\r\n    context: C\r\n) => void\r\n\r\ninterface ContextWrap\u003cP, O> {\r\n    instance: Context\u003cP, O>;\r\n}\r\n\r\ninterface TopContextWrap\u003cP, O> extends ContextWrap\u003cP, O> {\r\n    instance: TopContext\u003cP, O>;\r\n}\r\n```\r\n\r\n**Expected behavior:** It to take maybe a few seconds. Remove any one function or property out of that, and that's the compilation time I would normally expect.\r\n\r\n**Actual behavior:** It takes ~15-20 seconds to check, and requires ~180-200 MB of memory in the process.\r\n","author":{"url":"https://github.com/dead-claudia","@type":"Person","name":"dead-claudia"},"datePublished":"2017-12-08T00:16:38Z","url":"https://github.com/microsoft/TypeScript/issues/20558"}

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:22b52edf-3f81-1857-9dcc-a38f2d3a087f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9C26:23CF06:2A15D37:359A10C:6B019757
html-safe-nonce15742c3d78e38066ed2cd3eea0cf30038de697e51282e75a85a627817489803b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzI2OjIzQ0YwNjoyQTE1RDM3OjM1OUExMEM6NkIwMTk3NTciLCJ2aXNpdG9yX2lkIjoiMjA0MjE1NTMyNzgyMjA3NTczNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbdf714e599399568510aa2f75295e0070aa55a46b9d7ec97c133c2932d184fcd
hovercard-subject-tagissue:280325856
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/20558/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f6a2f3481895f81954f2141625ce892ba5580f746bd969a9596f44b4eb60f0ba/microsoft/TypeScript/issues/20558
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f6a2f3481895f81954f2141625ce892ba5580f746bd969a9596f44b4eb60f0ba/microsoft/TypeScript/issues/20558
og:image:altTypeScript Version: 2.6.2 Code Apologies for the length - I can't really make the repro any smaller than this without it taking a fraction of the time and about half the memory. Also, note: this do...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedead-claudia
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-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/20558#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F20558
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%2F20558
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/20558
Reloadhttps://github.com/microsoft/TypeScript/issues/20558
Reloadhttps://github.com/microsoft/TypeScript/issues/20558
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/20558
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/20558
Takes a while with high memory to calculate highly recursive types with intersectionshttps://github.com/microsoft/TypeScript/issues/20558#top
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: PerformancePerformance relatedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Performance%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/dead-claudia
Claudia Meadows (dead-claudia)https://github.com/dead-claudia
on Dec 8, 2017https://github.com/microsoft/TypeScript/issues/20558#issue-280325856
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Feb 2, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1454193030
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Feb 2, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1454193076
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Feb 2, 2018https://github.com/microsoft/TypeScript/issues/20558#issuecomment-362449899
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.8https://github.com/microsoft/TypeScript/milestone/61
on Feb 2, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1454193559
https://github.com/dead-claudia
Claudia Meadows (dead-claudia)https://github.com/dead-claudia
on Feb 2, 2018https://github.com/microsoft/TypeScript/issues/20558#issuecomment-362491431
Mohamed Hegazy (@mhegazy)https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.8https://github.com/microsoft/TypeScript/milestone/61
TypeScript 2.9https://github.com/microsoft/TypeScript/milestone/67
on Mar 9, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1514276515
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.9https://github.com/microsoft/TypeScript/milestone/67
TypeScript 2.9.1https://github.com/microsoft/TypeScript/milestone/71
on May 8, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1615921198
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.9.1https://github.com/microsoft/TypeScript/milestone/71
TypeScript 3.0https://github.com/microsoft/TypeScript/milestone/70
on May 21, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1637522049
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 3.0https://github.com/microsoft/TypeScript/milestone/70
Futurehttps://github.com/microsoft/TypeScript/milestone/29
on Jul 2, 2018https://github.com/microsoft/TypeScript/issues/20558#event-1712737872
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Jan 7, 2020https://github.com/microsoft/TypeScript/issues/20558#event-2929402395
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jul 10, 2023https://github.com/microsoft/TypeScript/issues/20558#issuecomment-1629424186
#52392https://github.com/microsoft/TypeScript/pull/52392
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Domain: PerformancePerformance relatedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Performance%22
on Oct 16, 2025https://github.com/microsoft/TypeScript/issues/20558#event-20330933322
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 29, 2025https://github.com/microsoft/TypeScript/issues/20558#event-20591364321
microsofthttps://github.com/microsoft
on Jun 5, 2026https://github.com/microsoft/TypeScript/issues/20558#event-26393597364
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/20558
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/20558
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: PerformancePerformance relatedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Performance%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.