Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts-plugin-type-coverage incredible slow #65

Open
darky opened this issue Sep 16, 2020 · 4 comments
Open

ts-plugin-type-coverage incredible slow #65

darky opened this issue Sep 16, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@darky
Copy link
Contributor

darky commented Sep 16, 2020

When I active it
https://github.com/plantain-00/type-coverage#the-typescript-language-service-plugin-of-type-coverageadded-in-v212

My IDE became incredible slow.
Each change of code entails CPU usage 100% of tsserver process.
Also tsserver eat 1.5GB of memory instead 300Mb like before.
Why it happens? Maybe type-coverage do full project check, when trivial change of code in file happens?
IDE responsibility on each change of code is 5-10 seconds now. Sorry, it's not useful for development.

@plantain-00 plantain-00 added help wanted Extra attention is needed Investigating labels Sep 16, 2020
@crazylive
Copy link

crazylive commented Sep 16, 2020

Have the same problem.

Noticed the bundle between TS 4.0.2 and type-coverage 2.13.1 has become much slower, compared to TS 3.7.5 and type-coverage 2.4.2

Unfortunately had to temporarily remove type-coverage after add to project dependency "styled-components". There is not enough ignore for the lib and everything connected with it.

Probably this is another issue...

Please help, i like type-coverage

@plantain-00
Copy link
Owner

I will check this issue this weekend, you can disable it by commenting it in "plugins" or disable the plugin.
@crazylive I checked the check time on this project, 1.8s with cache for v1.4.2, 2.1s ~ 3s without cache for v2.13.1, it seems not a problem.
屏幕快照 2020-09-17 06 52 34
屏幕快照 2020-09-17 06 52 46
https://travis-ci.org/github/plantain-00/type-coverage/builds/662305606
https://travis-ci.org/github/plantain-00/type-coverage/builds/726738671

@crazylive
Copy link

you right, seems it affected from other dependencies, i check it later

@plantain-00
Copy link
Owner

I checked, but I cannot reproduce it in my MacBook air.

屏幕快照 2020-09-19 16 32 10

I tried to enable the plugin by set plugins in tsconfig.json compilerOptions, also by install the vscode plugin. The plugin works as expected, and my CPU and memory looks normal. The VScode responsibility on each change of code is less than 0.5 seconds, same as usual.

I checked the code, the plugin just check the current file, not whole project:
https://github.com/plantain-00/type-coverage/blob/master/packages/plugin/src/index.ts#L18
https://github.com/plantain-00/type-coverage/blob/master/packages/core/src/core.ts#L176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants