Title: 3.4.1 tsc works 20! times slower than 3.3.4 · Issue #30663 · microsoft/TypeScript · GitHub
Open Graph Title: 3.4.1 tsc works 20! times slower than 3.3.4 · Issue #30663 · microsoft/TypeScript
X Title: 3.4.1 tsc works 20! times slower than 3.3.4 · Issue #30663 · microsoft/TypeScript
Description: TypeScript Version: 3.4.1 Search Terms: tsc, slow, typecheck, 3.4.1, styled-components Code I have simple typecheck script in my package.json: "typecheck": "tsc --project tsconfig.json --noEmit --skipLibCheck", It work 20 times slower on...
Open Graph Description: TypeScript Version: 3.4.1 Search Terms: tsc, slow, typecheck, 3.4.1, styled-components Code I have simple typecheck script in my package.json: "typecheck": "tsc --project tsconfig.json --noEmit --s...
X Description: TypeScript Version: 3.4.1 Search Terms: tsc, slow, typecheck, 3.4.1, styled-components Code I have simple typecheck script in my package.json: "typecheck": "tsc --project tsconfig.js...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/30663
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"3.4.1 tsc works 20! times slower than 3.3.4","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.4.1\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n\r\ntsc, slow, typecheck, 3.4.1, styled-components\r\n\r\n**Code**\r\n\r\nI have simple typecheck script in my package.json:\r\n```\r\n\"typecheck\": \"tsc --project tsconfig.json --noEmit --skipLibCheck\",\r\n``` \r\n\r\nIt work 20 times slower on 3.4.1, than on 3.3.4000 (91s vs 4.5s) \r\n\r\n\r\nIt's almost impossible to work with that, because IDE almost can't analyse anything in this conditions. I have same behaviour on MacOS 10.14.3 and on Windows 10\r\n\r\nMy tsconfig file:\r\n```json\r\n{\r\n \"compilerOptions\": {\r\n \"target\": \"es5\",\r\n \"lib\": [\r\n \"dom\",\r\n \"dom.iterable\",\r\n \"esnext\"\r\n ],\r\n \"allowJs\": true,\r\n \"skipLibCheck\": true,\r\n \"esModuleInterop\": true,\r\n \"allowSyntheticDefaultImports\": true,\r\n \"strict\": true,\r\n \"forceConsistentCasingInFileNames\": true,\r\n \"module\": \"esnext\",\r\n \"moduleResolution\": \"node\",\r\n \"resolveJsonModule\": true,\r\n \"isolatedModules\": true,\r\n \"noEmit\": true,\r\n \"jsx\": \"preserve\"\r\n },\r\n \"include\": [\r\n \"src\"\r\n ]\r\n}\r\n```\r\n \r\n**EDIT**: I found the reason of this slowness - styled-components, so faster way to reproduce this issue: (also online demo added below)\r\n```bash\r\nyarn create react-app my-app --typescript\r\ncd my-app\r\nyarn add styled-components @types/styled-components \r\n```\r\nadd to `src/index.tsx`: \r\n```jsx\r\nimport styled from 'styled-components'\r\nconst Styled = styled.div``\r\n```\r\nadd in package json tsc script in scripts section:\r\n```\r\n\"tsc\": \"tsc\"\r\n```\r\n\r\nrun `yarn tsc`\r\n\r\nif you'll downgrade typescript version to 3.3.4000 or comment 2 lines of code in `src/index.tsx` it will work 20 times faster\r\n\r\n**Expected behavior:**\r\n\r\nIt should works with same acceptable time \r\n\r\n**Actual behavior:**\r\n\r\nIt works 20 times slower\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\n\r\nI will try to create reproducible example, but I have pretty simple react CRA 2.0 application.\r\n\r\n**EDIT**: Reproducible demo here: [https://repl.it/@EugeneDraitsev/slow-tsc-341](https://repl.it/@EugeneDraitsev/slow-tsc-341)\r\n\r\n3.3.4000:\r\n\r\n\r\n\r\n3.4.1:\r\n\r\n\r\n\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\n","author":{"url":"https://github.com/EugeneDraitsev","@type":"Person","name":"EugeneDraitsev"},"datePublished":"2019-03-30T16:25:04Z","url":"https://github.com/microsoft/TypeScript/issues/30663"}
| 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:65ccdda9-1347-6b75-2672-3a653834122c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98AC:842EC:B8A2AF:F7ABC1:6B00F6A5 |
| html-safe-nonce | 28d0423f4ccfc72fb5c0b664217be124df567edddf6f5b91d57531d9300a3551 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEFDOjg0MkVDOkI4QTJBRjpGN0FCQzE6NkIwMEY2QTUiLCJ2aXNpdG9yX2lkIjoiNzQ4NjU0MjY2NDkzMDc1MjE2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eb9f7093e912460ab2fc694af0aa099841d86a6f02f7130359e0f89969714310 |
| hovercard-subject-tag | issue:427299974 |
| 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/30663/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fbf752452ef2df60806ea1723490a5f84fde4c63824c402e775f5168dc276fb3/microsoft/TypeScript/issues/30663 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fbf752452ef2df60806ea1723490a5f84fde4c63824c402e775f5168dc276fb3/microsoft/TypeScript/issues/30663 |
| og:image:alt | TypeScript Version: 3.4.1 Search Terms: tsc, slow, typecheck, 3.4.1, styled-components Code I have simple typecheck script in my package.json: "typecheck": "tsc --project tsconfig.json --noEmit --s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EugeneDraitsev |
| 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