Title: tsc compilation slow on moderate sized project · Issue #37635 · microsoft/TypeScript · GitHub
Open Graph Title: tsc compilation slow on moderate sized project · Issue #37635 · microsoft/TypeScript
X Title: tsc compilation slow on moderate sized project · Issue #37635 · microsoft/TypeScript
Description: TypeScript Version: 3.9.0-dev.20200326 Search Terms: tsc slow compilation, tsc memory, tsc slow Program time, tsc Program time Code I'm trying to debug why my typescript compiler is taking 9-13 seconds to recompile. This impacts ts-node ...
Open Graph Description: TypeScript Version: 3.9.0-dev.20200326 Search Terms: tsc slow compilation, tsc memory, tsc slow Program time, tsc Program time Code I'm trying to debug why my typescript compiler is taking 9-13 sec...
X Description: TypeScript Version: 3.9.0-dev.20200326 Search Terms: tsc slow compilation, tsc memory, tsc slow Program time, tsc Program time Code I'm trying to debug why my typescript compiler is taking 9-13...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/37635
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tsc compilation slow on moderate sized project","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!--\r\nPlease try to reproduce the issue with the latest published version. It may have 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\n**TypeScript Version:** 3.9.0-dev.20200326\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 compilation, tsc memory, tsc slow Program time, tsc Program time\r\n\r\n**Code**\r\n\r\nI'm trying to debug why my typescript compiler is taking 9-13 seconds to recompile. This impacts ts-node and development drastically.\r\n\r\ntypescript version: ^3.X.X\r\n\r\ntsconfig.json:\r\n\r\n```\r\n{\r\n \"compilerOptions\": {\r\n \"extendedDiagnostics\": true,\r\n \"target\": \"es6\",\r\n \"lib\": [\"es2017\"],\r\n \"module\": \"commonjs\",\r\n \"emitDeclarationOnly\": true,\r\n \"emitDecoratorMetadata\": true,\r\n \"experimentalDecorators\": true,\r\n \"incremental\": true,\r\n \"noResolve\": false,\r\n \"noEmitOnError\": false,\r\n \"noImplicitAny\": true,\r\n \"declaration\": true,\r\n \"sourceMap\": true,\r\n \"outDir\": \"dist/\",\r\n \"moduleResolution\": \"node\",\r\n \"skipLibCheck\": true\r\n },\r\n \"include\": [\r\n \"src/**/*.ts\",\r\n \"test/**/*.ts\"\r\n ],\r\n \"exclude\": [\r\n \"node_modules\"\r\n ]\r\n}\r\n```\r\n\r\n```\r\nnpx tsc --listFiles --generateCpuProfile profile\r\n```\r\n\r\nFiles: 732\r\nLines: 364288\r\nNodes: 1133413\r\nIdentifiers: 417612\r\nSymbols: 236577\r\nTypes: 76\r\nInstantiations: 0\r\nMemory used: 330244K\r\nAssignability cache size: 0\r\nIdentity cache size: 0\r\nSubtype cache size: 0\r\nStrict subtype cache size: 0\r\nI/O Read time: 2.51s\r\nParse time: 3.77s\r\nResolveTypeReference time: 0.33s\r\nResolveModule time: 2.91s\r\nProgram time: 9.86s\r\nBind time: 1.39s\r\nTotal time: 11.25s\r\n\r\nFile List Here: https://pastebin.com/zX7TpM2x\r\n\r\nGenerated CPU Profile Here: https://gist.github.com/rightisleft/d3c77fe2c643ba4c7832a94209f53ef2\r\n\r\n**Expected behavior:**\r\n\r\nThis is a mid sized project, it should have a 1-3 second compile time\r\n\r\n**Actual behavior:**\r\n\r\nCompile takes anywhere from 9-14 seconds per line change","author":{"url":"https://github.com/rightisleft","@type":"Person","name":"rightisleft"},"datePublished":"2020-03-27T03:06:35Z","url":"https://github.com/microsoft/TypeScript/issues/37635"}
| 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:4d6e7a0f-6c12-7f23-2bf1-58e97df17a99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E0F2:6DC60:23328C1:2C76A7A:6B01B211 |
| html-safe-nonce | 4923522d164710a9b41c80da8e22fab5557d19567a05ffb7f3bce345772ec5c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMEYyOjZEQzYwOjIzMzI4QzE6MkM3NkE3QTo2QjAxQjIxMSIsInZpc2l0b3JfaWQiOiIxMTgyNTU1NjQ2ODczMTU0MDY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f1b50b522e37cc1d25ac324b670446ceb2e648d4c26ee15f530f40f5384f3d26 |
| hovercard-subject-tag | issue:588854131 |
| 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/37635/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ec202a9b36f4451a7d3d14f974101836cdfbb89a8010f18ff3070a9eb650270/microsoft/TypeScript/issues/37635 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ec202a9b36f4451a7d3d14f974101836cdfbb89a8010f18ff3070a9eb650270/microsoft/TypeScript/issues/37635 |
| og:image:alt | TypeScript Version: 3.9.0-dev.20200326 Search Terms: tsc slow compilation, tsc memory, tsc slow Program time, tsc Program time Code I'm trying to debug why my typescript compiler is taking 9-13 sec... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rightisleft |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width