René's URL Explorer Experiment


Title: [PERFORMANCE]: TS takes several seconds to validate types resulting in poor DX · Issue #54939 · microsoft/TypeScript · GitHub

Open Graph Title: [PERFORMANCE]: TS takes several seconds to validate types resulting in poor DX · Issue #54939 · microsoft/TypeScript

X Title: [PERFORMANCE]: TS takes several seconds to validate types resulting in poor DX · Issue #54939 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information This is a slow type verification leading to bad DX. ⏯ Playground Link Playground link with relevant code Related issue: drizzle-team/drizzle-orm#870 💻 Code // We can quickly ad...

Open Graph Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information This is a slow type verification leading to bad DX. ⏯ Playground Link Playground link with relevant code Related issue: drizzle-team/dri...

X Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information This is a slow type verification leading to bad DX. ⏯ Playground Link Playground link with relevant code Related issue: drizzle-team...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[PERFORMANCE]: TS takes several seconds to validate types resulting in poor DX","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n  Please fill in each section completely. Thank you!\r\n-->\r\n\r\n### 🔎 Search Terms\r\n\r\n\u003c!--\r\n  What search terms did you use when trying to find an existing bug report?\r\n  List them here so people in the future can find this one more easily.\r\n-->\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n\u003c!-- When did you start seeing this bug occur?\r\n\r\n\"Bugs\" that have existed in TS for a long time are very likely to be FAQs; refer to\r\n  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs\r\n\r\nIf possible, please try testing the nightly version of TS to see if it's already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n\r\nNote: The TypeScript Playground can be used to try older versions of TypeScript.\r\n\r\nPlease keep and fill in the line that best applies:\r\n-->\r\n- This is a slow type verification leading to bad DX.\r\n\r\n### ⏯ Playground Link\r\n\r\n\u003c!--\r\n  A link to a TypeScript Playground \"Share\" link which shows this behavior.\r\n  This should have the same code as the code snippet below, and use whichever settings are relevant to your report.\r\n\r\n  As a last resort, you can link to a repo, but these will be slower for us to investigate.\r\n-->\r\n[Playground link with relevant code](https://stackblitz.com/edit/stackblitz-starters-vgeb6t?description=&file=index.ts,package.json&title=json-server%20Starter)\r\n\r\nRelated issue: https://github.com/drizzle-team/drizzle-orm/issues/870\r\n\r\n### 💻 Code\r\n\r\n\u003c!-- Please post the relevant code sample here as well. This code and the Playground code should be the same, do not use separate examples -->\r\n```ts\r\n// We can quickly address your report if:\r\n//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!\r\n//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.\r\n//  - The incorrectness of the behavior is readily apparent from reading the sample.\r\n// Reports are slower to investigate if:\r\n//  - We have to pare too much extraneous code.\r\n//  - We have to clone a large repo and validate that the problem isn't elsewhere.\r\n//  - The sample is confusing or doesn't clearly demonstrate what's wrong.\r\n```\r\n\r\nI understand that this issue uses an external library, `drizzle` which is the source of performance problems. However, I think it would be useful for the TS team to see how people use types in real world and to see if either the `drizzle` team can fix the types to be better performant or the TS team can do something to better handle the use cases used by `drizzle`.\r\n\r\n\r\n```typescript\r\nimport { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';\r\n\r\n/**\r\n * This is a reproduction of slow TypeScript type validation with Drizzle.\r\n *\r\n * Steps to reproduce:\r\n * 1. Change \"EDIT THIS\" line and change `2` to `\"2\"` (add qoutes around the number)\r\n *    and save the file\r\n * 2. Because we have changed number to string the TS will now underline the line as\r\n *    being invalid.\r\n * 3. Go back and forth between the `2` and `\"2\"` and notice that there is a several\r\n *    second delay everytime you change source code and TS either has to add or remove\r\n *    the red underline. (TS Error)\r\n * 4. Once you establish a beseline feel to how long it takes TS to add/removo an error,\r\n *    comment out the `delayCount`/`latencyCount` block and repeat the steps\r\n * 5. Notice that now the add/remove error is instant.\r\n */\r\n\r\nconst x: number = 2; // EDIT THIS\r\n\r\nexport const edgeTable = sqliteTable('edges', {\r\n  id: integer('id').primaryKey(),\r\n  manifestHash: text('manifest_hash').notNull(),\r\n  from: text('from'),\r\n  to: text('to').notNull(),\r\n  interaction: integer('interaction').notNull(),\r\n\r\n  // COMMENT OUT THE LINES BELOW\r\n  //////////////////////////////\r\n  // START\r\n\r\n  delayCount00: integer('delay_count_00').notNull(),\r\n  delayCount01: integer('delay_count_01').notNull(),\r\n  delayCount02: integer('delay_count_02').notNull(),\r\n  delayCount03: integer('delay_count_03').notNull(),\r\n  delayCount04: integer('delay_count_04').notNull(),\r\n  delayCount05: integer('delay_count_05').notNull(),\r\n  delayCount06: integer('delay_count_06').notNull(),\r\n  delayCount07: integer('delay_count_07').notNull(),\r\n  delayCount08: integer('delay_count_08').notNull(),\r\n  delayCount09: integer('delay_count_09').notNull(),\r\n  delayCount10: integer('delay_count_10').notNull(),\r\n  delayCount11: integer('delay_count_11').notNull(),\r\n  delayCount12: integer('delay_count_12').notNull(),\r\n  delayCount13: integer('delay_count_13').notNull(),\r\n  delayCount14: integer('delay_count_14').notNull(),\r\n  delayCount15: integer('delay_count_15').notNull(),\r\n  delayCount16: integer('delay_count_16').notNull(),\r\n  delayCount17: integer('delay_count_17').notNull(),\r\n  delayCount18: integer('delay_count_18').notNull(),\r\n  delayCount19: integer('delay_count_19').notNull(),\r\n  delayCount20: integer('delay_count_20').notNull(),\r\n  delayCount21: integer('delay_count_21').notNull(),\r\n  delayCount22: integer('delay_count_22').notNull(),\r\n  delayCount23: integer('delay_count_23').notNull(),\r\n  delayCount24: integer('delay_count_24').notNull(),\r\n  delayCount25: integer('delay_count_25').notNull(),\r\n  delayCount26: integer('delay_count_26').notNull(),\r\n  delayCount27: integer('delay_count_27').notNull(),\r\n  delayCount28: integer('delay_count_28').notNull(),\r\n  delayCount29: integer('delay_count_29').notNull(),\r\n  delayCount30: integer('delay_count_30').notNull(),\r\n  delayCount31: integer('delay_count_31').notNull(),\r\n  delayCount32: integer('delay_count_32').notNull(),\r\n  delayCount33: integer('delay_count_33').notNull(),\r\n  delayCount34: integer('delay_count_34').notNull(),\r\n  delayCount35: integer('delay_count_35').notNull(),\r\n  delayCount36: integer('delay_count_36').notNull(),\r\n  delayCount37: integer('delay_count_37').notNull(),\r\n  delayCount38: integer('delay_count_38').notNull(),\r\n  delayCount39: integer('delay_count_39').notNull(),\r\n  delayCount40: integer('delay_count_40').notNull(),\r\n  delayCount41: integer('delay_count_41').notNull(),\r\n  delayCount42: integer('delay_count_42').notNull(),\r\n  delayCount43: integer('delay_count_43').notNull(),\r\n  delayCount44: integer('delay_count_44').notNull(),\r\n  delayCount45: integer('delay_count_45').notNull(),\r\n  delayCount46: integer('delay_count_46').notNull(),\r\n  delayCount47: integer('delay_count_47').notNull(),\r\n  delayCount48: integer('delay_count_48').notNull(),\r\n  delayCount49: integer('delay_count_49').notNull(),\r\n  latencyCount00: integer('latency_count_00').notNull(),\r\n  latencyCount01: integer('latency_count_01').notNull(),\r\n  latencyCount02: integer('latency_count_02').notNull(),\r\n  latencyCount03: integer('latency_count_03').notNull(),\r\n  latencyCount04: integer('latency_count_04').notNull(),\r\n  latencyCount05: integer('latency_count_05').notNull(),\r\n  latencyCount06: integer('latency_count_06').notNull(),\r\n  latencyCount07: integer('latency_count_07').notNull(),\r\n  latencyCount08: integer('latency_count_08').notNull(),\r\n  latencyCount09: integer('latency_count_09').notNull(),\r\n  latencyCount10: integer('latency_count_10').notNull(),\r\n  latencyCount11: integer('latency_count_11').notNull(),\r\n  latencyCount12: integer('latency_count_12').notNull(),\r\n  latencyCount13: integer('latency_count_13').notNull(),\r\n  latencyCount14: integer('latency_count_14').notNull(),\r\n  latencyCount15: integer('latency_count_15').notNull(),\r\n  latencyCount16: integer('latency_count_16').notNull(),\r\n  latencyCount17: integer('latency_count_17').notNull(),\r\n  latencyCount18: integer('latency_count_18').notNull(),\r\n  latencyCount19: integer('latency_count_19').notNull(),\r\n  latencyCount20: integer('latency_count_20').notNull(),\r\n  latencyCount21: integer('latency_count_21').notNull(),\r\n  latencyCount22: integer('latency_count_22').notNull(),\r\n  latencyCount23: integer('latency_count_23').notNull(),\r\n  latencyCount24: integer('latency_count_24').notNull(),\r\n  latencyCount25: integer('latency_count_25').notNull(),\r\n  latencyCount26: integer('latency_count_26').notNull(),\r\n  latencyCount27: integer('latency_count_27').notNull(),\r\n  latencyCount28: integer('latency_count_28').notNull(),\r\n  latencyCount29: integer('latency_count_29').notNull(),\r\n  latencyCount30: integer('latency_count_30').notNull(),\r\n  latencyCount31: integer('latency_count_31').notNull(),\r\n  latencyCount32: integer('latency_count_32').notNull(),\r\n  latencyCount33: integer('latency_count_33').notNull(),\r\n  latencyCount34: integer('latency_count_34').notNull(),\r\n  latencyCount35: integer('latency_count_35').notNull(),\r\n  latencyCount36: integer('latency_count_36').notNull(),\r\n  latencyCount37: integer('latency_count_37').notNull(),\r\n  latencyCount38: integer('latency_count_38').notNull(),\r\n  latencyCount39: integer('latency_count_39').notNull(),\r\n  latencyCount40: integer('latency_count_40').notNull(),\r\n  latencyCount41: integer('latency_count_41').notNull(),\r\n  latencyCount42: integer('latency_count_42').notNull(),\r\n  latencyCount43: integer('latency_count_43').notNull(),\r\n  latencyCount44: integer('latency_count_44').notNull(),\r\n  latencyCount45: integer('latency_count_45').notNull(),\r\n  latencyCount46: integer('latency_count_46').notNull(),\r\n  latencyCount47: integer('latency_count_47').notNull(),\r\n  latencyCount48: integer('latency_count_48').notNull(),\r\n  latencyCount49: integer('latency_count_49').notNull(),\r\n\r\n  // END\r\n});\r\n\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\n\u003c!-- What happened, and why it was wrong -->\r\n\r\nSlow (2-3 second) TS validation time. This interferes with code-completion and makes for a bad DX.\r\n\r\n### 🙂 Expected behavior\r\n\r\n\u003c!-- What you expected to happen instead, and why -->\r\n\r\nType validation should stay performant.\r\n","author":{"url":"https://github.com/mhevery","@type":"Person","name":"mhevery"},"datePublished":"2023-07-09T21:05:18Z","url":"https://github.com/microsoft/TypeScript/issues/54939"}

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:6ef855c9-ab05-7018-cb4a-3c99a1f1c066
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD83A:B53AF:DBB90D:12547D9:6B01027E
html-safe-nonce5b4c3fb1792ee0e3f1751ab4b2ff2c1785b030ba817bb44b98f39d0ade3c48c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODNBOkI1M0FGOkRCQjkwRDoxMjU0N0Q5OjZCMDEwMjdFIiwidmlzaXRvcl9pZCI6IjUxMTQxODcyNTk1OTUyNjA1NDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac398a160d3d262e3cfbc128a8457365d2f0bb86f441125c513460da37173641b0
hovercard-subject-tagissue:1795563206
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/54939/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b50726ea53abe46b60469b67e4b2e48d43b4f7c1a06b228875d78ce2f57e3e8c/microsoft/TypeScript/issues/54939
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b50726ea53abe46b60469b67e4b2e48d43b4f7c1a06b228875d78ce2f57e3e8c/microsoft/TypeScript/issues/54939
og:image:altBug Report 🔎 Search Terms 🕗 Version & Regression Information This is a slow type verification leading to bad DX. ⏯ Playground Link Playground link with relevant code Related issue: drizzle-team/dri...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemhevery
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
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
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/54939#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F54939
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%2F54939
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/54939
Reloadhttps://github.com/microsoft/TypeScript/issues/54939
Reloadhttps://github.com/microsoft/TypeScript/issues/54939
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)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/54939
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/54939
[PERFORMANCE]: TS takes several seconds to validate types resulting in poor DXhttps://github.com/microsoft/TypeScript/issues/54939#top
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
https://github.com/mhevery
Miško Hevery (mhevery)https://github.com/mhevery
on Jul 9, 2023https://github.com/microsoft/TypeScript/issues/54939#issue-1795563206
Playground link with relevant codehttps://stackblitz.com/edit/stackblitz-starters-vgeb6t?description=&file=index.ts,package.json&title=json-server%20Starter
drizzle-team/drizzle-orm#870https://github.com/drizzle-team/drizzle-orm/issues/870
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%22
on Jul 10, 2023https://github.com/microsoft/TypeScript/issues/54939#event-9780841512
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jul 10, 2023https://github.com/microsoft/TypeScript/issues/54939#issuecomment-1629878106
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Aug 3, 2023https://github.com/microsoft/TypeScript/issues/54939#issuecomment-1664733024
Miško Hevery (@mhevery)https://github.com/mhevery
#55224https://github.com/microsoft/TypeScript/pull/55224
#55224 (comment)https://github.com/microsoft/TypeScript/pull/55224#issuecomment-1664729772
https://github.com/luxaritas
Jonathan Romano (luxaritas)https://github.com/luxaritas
on Aug 22, 2023https://github.com/microsoft/TypeScript/issues/54939#issuecomment-1687483067
Jake Bailey (@jakebailey)https://github.com/jakebailey
https://stackblitz.com/edit/stackblitz-starters-uaglzu?file=index.tshttps://stackblitz.com/edit/stackblitz-starters-uaglzu?file=index.ts
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/54939
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/54939
Needs More InfoThe issue still hasn't been fully clarifiedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20More%20Info%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.