Title: Slow compilation issues (40-50s) - --skipLibCheck not working · Issue #41517 · microsoft/TypeScript · GitHub
Open Graph Title: Slow compilation issues (40-50s) - --skipLibCheck not working · Issue #41517 · microsoft/TypeScript
X Title: Slow compilation issues (40-50s) - --skipLibCheck not working · Issue #41517 · microsoft/TypeScript
Description: TypeScript Version: 3.8.3 Search Terms: --skipLibCheck slow compilation tsc Code Running tsc --listFiles --generateCpuProfile profile --skipLibCheck from the command line results in having the following output - which appears to be slowi...
Open Graph Description: TypeScript Version: 3.8.3 Search Terms: --skipLibCheck slow compilation tsc Code Running tsc --listFiles --generateCpuProfile profile --skipLibCheck from the command line results in having the foll...
X Description: TypeScript Version: 3.8.3 Search Terms: --skipLibCheck slow compilation tsc Code Running tsc --listFiles --generateCpuProfile profile --skipLibCheck from the command line results in having the foll...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/41517
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Slow compilation issues (40-50s) - --skipLibCheck not working","articleBody":"**TypeScript Version:** 3.8.3\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** --skipLibCheck slow compilation tsc\r\n\r\n**Code**\r\n\r\nRunning tsc --listFiles --generateCpuProfile profile --skipLibCheck from the command line results in having the following output - which appears to be slowing compilation significantly. It appears as though it's including multiple .d.ts files from my @types node_modules in the compilation. What sort of time should I be expecting this amount of files to compile in? **Any help reducing the compilation time would also be greatly appreciated.**\r\n\r\n```\r\n/home/user1/projects/projectName/node_modules/@types/semantic-ui-form/global.d.ts\r\n/home/user1/projects/projectName/node_modules/@types/jquery/JQueryStatic.d.ts\r\n/home/user1/projects/projectName/node_modules/@types/moment-timezone/moment-timezone.d.ts\r\n.....etc\r\n\r\nExtended diagnostics are:\r\nFiles: 3022\r\nLines: 410050\r\nNodes: 1604064\r\nIdentifiers: 555657\r\nSymbols: 804555\r\nTypes: 254555\r\nMemory used: 1220647K\r\nAssignability cache size: 95587\r\nIdentity cache size: 13620\r\nSubtype cache size: 4718477\r\nStrict subtype cache size: 6378\r\nI/O Read time: 0.10s\r\nParse time: 1.78s\r\nProgram time: 3.22s\r\nBind time: 1.45s\r\nCheck time: 39.98s\r\ntransformTime time: 1.39s\r\ncommentTime time: 0.56s\r\nI/O Write time: 0.20s\r\nprintTime time: 5.02s\r\nEmit time: 5.02s\r\nTotal time: 49.68s\r\n \r\n```\r\n\r\nmy tsconfig is as follows:\r\n```\r\n{\r\n \"compilerOptions\": {\r\n \"outDir\": \"./dist/\",\r\n \"extendedDiagnostics\": true,\r\n \"baseUrl\": \"src/\",\r\n \"module\": \"commonjs\",\r\n \"target\": \"es6\",\r\n \"jsx\": \"react\",\r\n \"allowJs\": true,\r\n \"allowSyntheticDefaultImports\": true,\r\n \"moduleResolution\": \"node\",\r\n \"esModuleInterop\": true,\r\n \"strict\": true,\r\n \"experimentalDecorators\": true,\r\n \"skipLibCheck\": true,\r\n \"lib\": [\r\n \"dom\",\r\n \"es2015\",\r\n \"scripthost\",\r\n \"es6\",\r\n \"es2016\",\r\n \"es2017\"\r\n ]\r\n },\r\n \"include\": [\r\n \"./src/**/*.ts\",\r\n \"./src/**/*.tsx\"\r\n ],\r\n \"exclude\": [\r\n \"node_modules\",\r\n \".idea\",\r\n \".storybook\",\r\n \".git\",\r\n \"dist\"\r\n ]\r\n}\r\n\r\n```\r\n\r\nwith my project folder structure being:\r\n```\r\n├── src\r\n│ ├── folder1/....\r\n│ └── folder2/.....\r\n├── node_modules\r\n│ ├── shouldNotBeCompiled1.d.ts\r\n│ ├── shouldNotBeCompiled2.d.ts\r\n│ └── shouldNotBeCompiled3.d.ts\r\n├── dist\r\n```\r\n\r\n**Expected behavior:**\r\nShould not type-check any of the files inside node_modules during compilation\r\n**Actual behavior:**\r\nAppears to be including node_modules/@types during compilation - which is causing a compilation time of ~50s for project.\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\nhttps://github.com/microsoft/TypeScript/issues/37635\r\nhttps://github.com/microsoft/TypeScript/issues/36103\r\n","author":{"url":"https://github.com/NoPhaseNoKill","@type":"Person","name":"NoPhaseNoKill"},"datePublished":"2020-11-12T18:17:14Z","url":"https://github.com/microsoft/TypeScript/issues/41517"}
| 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:140eb3ad-01dc-65e5-e3a6-1e0b251113f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9634:311640:2A27F91:359BDB0:6B01AB05 |
| html-safe-nonce | 59f74baf746ceca5d79cb3b0e7015e54e08f0004825e97c526bad2a3bc5c4230 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjM0OjMxMTY0MDoyQTI3RjkxOjM1OUJEQjA6NkIwMUFCMDUiLCJ2aXNpdG9yX2lkIjoiNjg0MzQ0NjM5Njk3MzA2NzAxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8e796532893ea9f3cfa6363495eb742ea2e596660144f6f5dae75f3bd7edfd3c |
| hovercard-subject-tag | issue:741820996 |
| 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/41517/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b85c0d2fa6a54d2965a8a1a4b2692377b031aa596d0adef0825031f789b43d0/microsoft/TypeScript/issues/41517 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b85c0d2fa6a54d2965a8a1a4b2692377b031aa596d0adef0825031f789b43d0/microsoft/TypeScript/issues/41517 |
| og:image:alt | TypeScript Version: 3.8.3 Search Terms: --skipLibCheck slow compilation tsc Code Running tsc --listFiles --generateCpuProfile profile --skipLibCheck from the command line results in having the foll... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | NoPhaseNoKill |
| 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