Title: Performance regression from #48044 · Issue #52345 · microsoft/TypeScript · GitHub
Open Graph Title: Performance regression from #48044 · Issue #52345 · microsoft/TypeScript
X Title: Performance regression from #48044 · Issue #52345 · microsoft/TypeScript
Description: Bug Report It seems like a fairly significant performance regression was introduced in this #48044, which was shipped in TS 4.7. In TS 4.6, it takes ~30 seconds to run yarn tsc in our repo, and the reported strict subtype cache size is 2...
Open Graph Description: Bug Report It seems like a fairly significant performance regression was introduced in this #48044, which was shipped in TS 4.7. In TS 4.6, it takes ~30 seconds to run yarn tsc in our repo, and the...
X Description: Bug Report It seems like a fairly significant performance regression was introduced in this #48044, which was shipped in TS 4.7. In TS 4.6, it takes ~30 seconds to run yarn tsc in our repo, and the...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/52345
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performance regression from #48044","articleBody":"# Bug Report\r\n\r\nIt seems like a fairly significant performance regression was introduced in this https://github.com/microsoft/TypeScript/pull/48044, which was shipped in TS 4.7. In TS 4.6, it takes ~30 seconds to run `yarn tsc` in our repo, and the reported strict subtype cache size is 24_011. In TS 4.7, it takes 75+ seconds to run `yarn tsc` (~2.5x longer than previous), and the reported strict subtype cache size is 122_778 (~5x larger than previous).\r\n\r\nI verified that it was that specific PR that regressed the performance by taking a locally-installed 4.6.4 and applying the changes from that PR directly.\r\n\r\nAnother symptom is that several types (mostly spreads of objects into others) are now reporting as \"Expression produces a union type that is too complex to represent.\"\r\n\r\n### 🔎 Search Terms\r\n\r\n`Expression produces a union type that is too complex to represent`, `strict subtype cache size`\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- Regressed in https://github.com/microsoft/TypeScript/pull/48044\r\n- This changed between versions 4.6.4 and 4.7.3\r\n\r\n|Version|Time|Strict Subtype Cache Size|\r\n|-------|-----|--------------------------|\r\n|4.6.4 | 33s | 24011 |\r\n|4.7.3 | 75s | 122778 |\r\n|4.9.4 | 77s | 122869 |\r\n|5.0.0-dev.20230120 | 78s | 122869 |\r\n\r\n### 💻 Code\r\n\r\nI haven't been able to narrow down a minimal reproduction of this issue, but if someone points me in the right direction I'm happy to work on it.\r\n\r\n### 🙁 Actual behavior\r\n\r\nRunning `yarn tsc --noEmit --extendedDiagnostics` takes ~75 seconds in our repo, with a Strict subtype cache size of 122778.\r\n\r\n### 🙂 Expected behavior\r\n\r\nRunning `yarn tsc --noEmit --extendedDiagnostics` takes ~30 seconds in our repo, with a Strict subtype cache size of 24011.\r\n\r\n\r\n\r\n\r\n","author":{"url":"https://github.com/epmatsw","@type":"Person","name":"epmatsw"},"datePublished":"2023-01-20T23:19:07Z","url":"https://github.com/microsoft/TypeScript/issues/52345"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:91f908a3-ebab-d300-e7c7-1e486922a915 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E74:19F84C:E0598F:12079A1:6B00F535 |
| html-safe-nonce | 67c56a314114257528184eef4a62532615fa63d6e363c322b3019e3c1f51eac2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTc0OjE5Rjg0QzpFMDU5OEY6MTIwNzlBMTo2QjAwRjUzNSIsInZpc2l0b3JfaWQiOiIzOTQ0MjkyODU0OTYwNTkxODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a9e587353a47b1af338e7deea9d61c23352f6b1b3c72ec2ab969fec7529475cc |
| hovercard-subject-tag | issue:1551568591 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/52345/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4f4b748ec51e3e5c52520e1ca717b343524abf17d4ebf6477af4f4e31b33f199/microsoft/TypeScript/issues/52345 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4f4b748ec51e3e5c52520e1ca717b343524abf17d4ebf6477af4f4e31b33f199/microsoft/TypeScript/issues/52345 |
| og:image:alt | Bug Report It seems like a fairly significant performance regression was introduced in this #48044, which was shipped in TS 4.7. In TS 4.6, it takes ~30 seconds to run yarn tsc in our repo, and the... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | epmatsw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width