Title: Debugging long check times with TypeScript? · Issue #24435 · microsoft/TypeScript · GitHub
Open Graph Title: Debugging long check times with TypeScript? · Issue #24435 · microsoft/TypeScript
X Title: Debugging long check times with TypeScript? · Issue #24435 · microsoft/TypeScript
Description: TypeScript Version: 2.9.0-dev.20180516 I have a toy project I've been working on and, in general, it takes about 50-60s to type check, and, sometimes, I get out of memory exceptions. > node --max-old-space-size=8192 ./node_modules/typesc...
Open Graph Description: TypeScript Version: 2.9.0-dev.20180516 I have a toy project I've been working on and, in general, it takes about 50-60s to type check, and, sometimes, I get out of memory exceptions. > node --max-o...
X Description: TypeScript Version: 2.9.0-dev.20180516 I have a toy project I've been working on and, in general, it takes about 50-60s to type check, and, sometimes, I get out of memory exceptions. > node ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/24435
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Debugging long check times with TypeScript?","articleBody":"TypeScript Version: 2.9.0-dev.20180516\r\n\r\nI have a toy project I've been working on and, in general, it takes about 50-60s to type check, and, sometimes, I get out of memory exceptions.\r\n\r\n```\r\n> node --max-old-space-size=8192 ./node_modules/typescript/lib/tsc.js --noEmit --noErrorTruncation --diagnostics\r\n\r\nFiles: 166\r\nLines: 57676\r\nNodes: 312303\r\nIdentifiers: 108968\r\nSymbols: 158671\r\nTypes: 75995\r\nMemory used: 1354006K\r\nI/O read: 0.04s\r\nI/O write: 0.00s\r\nParse time: 2.18s\r\nBind time: 0.90s\r\nCheck time: 60.80s\r\nEmit time: 0.00s\r\nTotal time: 63.89s\r\n```\r\n\r\nI'm unsure if such wait times are normal or if it's just me.\r\n\r\nI'm finally writing this question because I added one method to a class and it caused `tsc` to not terminate. I've waited over twenty minutes and it's still not ending.\r\n\r\nIf I comment out the method I just added, I can get `tsc` to terminate without errors.\r\n\r\n-----\r\n\r\nThe code in question is [here](https://github.com/AnyhowStep/typed-orm/blob/master/src/main/declaration-v2/table/table.ts#L230)\r\n\r\n(Ignore that the folder is called `declaration-v2`, I never got around to renaming it)\r\n\r\n-----\r\n\r\nIs there a way to get `tsc` to output what phase of the check it's at and what files it's reading *as it checks*, etc.?\r\n\r\nSomething like,\r\n\r\n```\r\nReading file X.ts\r\nChecking class A\r\nChecking class B\r\nReading file Y.ts\r\nChecking class C\r\n```\r\n\r\n`--listFiles` isn't particularly helpful for this case because it outputs that at the end, and `tsc` won't even terminate at the moment.\r\n\r\nOr are there other guidelines I can use to debug long check times?\r\n\r\nI understand the type system is very complex but I feel my productivity has been taking a huge hit when I can barely get IntelliSense and type checking to work with VS code, and Atom with `atom-typescript` just crashes, (I assume it's related to the long check times) and have to resort to using the terminal every once in a while to sanity check my code.\r\n\r\n-----\r\n\r\nI understand that this issues page is not for questions like these but I've found the answers on StackOverflow unsatisfactory, and sitting here waiting for `tsc` to terminate is kind of frustrating.\r\n\r\nI'm unsure if I can even reduce this to a minimal example because the project is huge. But at least I've found the method to comment/uncomment to reproduce the issue.\r\n\r\n-----\r\n\r\n[EDIT]\r\n\r\nThis is also the first time I've encountered this problem. I'd actually be relieved if I could get an out of memory exception right now. Memory usage is actually surprisingly low. But it's just not terminating...\r\n\r\nMaybe an infinite loop?","author":{"url":"https://github.com/AnyhowStep","@type":"Person","name":"AnyhowStep"},"datePublished":"2018-05-26T23:25:49Z","url":"https://github.com/microsoft/TypeScript/issues/24435"}
| 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:66d038ab-75c4-38dc-dd5e-88de5c42e885 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC28:65478:C7230A:10A1255:6B00F8BC |
| html-safe-nonce | cf36b922986faa534cd54360ad79463123a67ac800bc6669bd837a5c5088482c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzI4OjY1NDc4OkM3MjMwQToxMEExMjU1OjZCMDBGOEJDIiwidmlzaXRvcl9pZCI6IjIxNjcxMTYxMzg1Nzg3NzAxMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | befbe7ccc08d5bda37ecd6ec76428d18de25a34f6a719b0dfed2318fd8d1216f |
| hovercard-subject-tag | issue:326774429 |
| 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/24435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/09565e04854aa7fc712dccb244c15cdc3a0c1f37caf0ff3044fd9be6dc1f9d44/microsoft/TypeScript/issues/24435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/09565e04854aa7fc712dccb244c15cdc3a0c1f37caf0ff3044fd9be6dc1f9d44/microsoft/TypeScript/issues/24435 |
| og:image:alt | TypeScript Version: 2.9.0-dev.20180516 I have a toy project I've been working on and, in general, it takes about 50-60s to type check, and, sometimes, I get out of memory exceptions. > node --max-o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AnyhowStep |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width