Title: Extra long code compilation whitch finished with "memory leak" report after ~20min · Issue #42937 · microsoft/TypeScript · GitHub
Open Graph Title: Extra long code compilation whitch finished with "memory leak" report after ~20min · Issue #42937 · microsoft/TypeScript
X Title: Extra long code compilation whitch finished with "memory leak" report after ~20min · Issue #42937 · microsoft/TypeScript
Description: This issue started here: TypeStrong/fork-ts-checker-webpack-plugin#569 Current behavior Make file: Api.ts /* eslint-disable */ /* tslint:disable */ import { HttpClient } from "./http-client"; export class Api
Open Graph Description: This issue started here: TypeStrong/fork-ts-checker-webpack-plugin#569 Current behavior Make file: Api.ts /* eslint-disable */ /* tslint:disable */ import { HttpClient } from "./http-client"; expor...
X Description: This issue started here: TypeStrong/fork-ts-checker-webpack-plugin#569 Current behavior Make file: Api.ts /* eslint-disable */ /* tslint:disable */ import { HttpClient } from "./http-client&qu...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/42937
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Extra long code compilation whitch finished with \"memory leak\" report after ~20min","articleBody":"This issue started here: https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/569\r\n\r\n## Current behavior\r\n\r\nMake file: `Api.ts`\r\n\r\n```typescript\r\n/* eslint-disable */\r\n/* tslint:disable */\r\nimport { HttpClient } from \"./http-client\";\r\n\r\nexport class Api\u003cSecurityDataType = unknown> {\r\n constructor(private http: HttpClient\u003cSecurityDataType>) {}\r\n\r\n abc1 = () => this.http.request();\r\n abc2 = () => this.http.request();\r\n abc3 = () => this.http.request();\r\n}\r\n```\r\n\r\nand `http-client.ts`\r\n\r\n```typescript\r\n/* eslint-disable */\r\n/* tslint:disable */\r\n\r\n/** Overrided Promise type. Needs for additional typings of `.catch` callback */\r\ntype TPromise\u003cResolveType, RejectType = any> = Omit\u003cPromise\u003cResolveType>, \"then\" | \"catch\"> & {\r\n then\u003cTResult1 = ResolveType, TResult2 = never>(\r\n onfulfilled?: ((value: ResolveType) => TResult1 | PromiseLike\u003cTResult1>) | undefined | null,\r\n onrejected?: ((reason: RejectType) => TResult2 | PromiseLike\u003cTResult2>) | undefined | null,\r\n ): TPromise\u003cTResult1 | TResult2, RejectType>;\r\n catch\u003cTResult = never>(\r\n onrejected?: ((reason: RejectType) => TResult | PromiseLike\u003cTResult>) | undefined | null,\r\n ): TPromise\u003cResolveType | TResult, RejectType>;\r\n};\r\n\r\nexport interface HttpResponse\u003cD extends unknown, E extends unknown = unknown> extends Response {\r\n data: D;\r\n error: E;\r\n}\r\n\r\nexport class HttpClient\u003cSecurityDataType = unknown> {\r\n public request = \u003cT = any, E = any>(): TPromise\u003cHttpResponse\u003cT, E>> => {\r\n return '' as any;\r\n };\r\n}\r\n```\r\n\r\ntry to compile, you will see that \"Issues checking in progress...\" process take extra long time ~15 sec.\r\nI dont know why, but if you Copy-Paste `http-client.ts` to `Api.ts` directly this check take \u003c1 sec.\r\n\r\nThis files make this lib https://github.com/acacode/swagger-typescript-api with ~1000 `this.http.request`, and each `this.http.request()` took ~7 sec of checking. When I do this in `intel i7` CPU, **after ~30 min of compiling I got error about `memory leak`.**\r\n\r\n**Video:** https://user-images.githubusercontent.com/3511307/108701953-4a842480-7511-11eb-9924-7f3c0c60acd0.mp4\r\n\r\n## Environment\r\n - **fork-ts-checker-webpack-plugin**: 6.1.0\r\n - **typescript**: 3.9.9\r\n - **eslint**: 6.8.0\r\n - **webpack**: 4.46.0\r\n - **os**: Linux mint 18.3 KDE\r\n\r\n**Tested on latest typescript 4.2.2** - same result.\r\n\r\nSame with `tsc --watch --noEmit`.\r\n\r\n**Video**: https://user-images.githubusercontent.com/3511307/108986783-2eac8a00-769b-11eb-9f9e-27f914830c8d.mp4","author":{"url":"https://github.com/mixalbl4-127","@type":"Person","name":"mixalbl4-127"},"datePublished":"2021-02-24T12:05:58Z","url":"https://github.com/microsoft/TypeScript/issues/42937"}
| 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:0f49a331-52b7-7970-37f9-bd364673a7cd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC4A:1EC9BC:307D07F:3DD90C2:6B01D1BE |
| html-safe-nonce | fdc2838db23b4b23cf8f2856c57b2c4569a278748d8b8199556cf2d90040a8ff |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzRBOjFFQzlCQzozMDdEMDdGOjNERDkwQzI6NkIwMUQxQkUiLCJ2aXNpdG9yX2lkIjoiODU1NzM3MDg3MzMxMTUxNTA3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1ba4a5a5916cfb278b266d4fa09486191963334055a36b025ef924efb0a66630 |
| hovercard-subject-tag | issue:815415798 |
| 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/42937/issue_layout |
| twitter:image | https://opengraph.githubassets.com/190a9f339b18afa167ccfc8979e20aeca403eb5b1980131daca1ed3fc09d2284/microsoft/TypeScript/issues/42937 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/190a9f339b18afa167ccfc8979e20aeca403eb5b1980131daca1ed3fc09d2284/microsoft/TypeScript/issues/42937 |
| og:image:alt | This issue started here: TypeStrong/fork-ts-checker-webpack-plugin#569 Current behavior Make file: Api.ts /* eslint-disable */ /* tslint:disable */ import { HttpClient } from "./http-client"; expor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mixalbl4-127 |
| 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