Typescript inspections sometimes unreliable and/or slow

There are times when TS inspections are slow -- meaning when I fix an error, WS can take several seconds or even longer to clear the error.

Other times, it seems like it never wants to clear the error.  I have to delete the code I just typed, type it again, then WS is satisfied.

Still other times, there are false positives -- WS doesn't report a TS error when it should have.

Has anyone else noticed this?  Is this a WS or TS issue?

20
46 comments

@Jeremy no; plus the issues reported by others are not necessary _your_ issue.

please create a support ticket, providing the detailed problem description along with CPU snapshots and your log folder zipped

 

0

I too am encountering this issue.  But it happens when someone else on the team has edited the file with VS code.  They are on Windows VS code, I'm on a Mac wit Webstorm 2019.1

0

Any updates about it? Checking types errors through IDE is still very slow.

2

Typechecking intellisense is still pretty slow for me too, but I think performance depends on the Typescript Language Service, which I believe is maintained by Microsoft and not Jetbrains. There might not be much for Jetbrains to optimize here :(

0

That was my original thinking too Nathan. However with for the same project, VSCode (relying on TS Language Service too) is much faster for type updates (display errors, ...) than Webstorm / IntelliJ. So it's the not the Language Service that is slow here. My thinking now, considering the comments, is a slowliness introduced on large projects using Angular, especially when  using HTML templates inside the .ts files.

Though it's hard to find the exact culprit here, so I never took time to open a support ticket. I don't know what to put that could be useful to the devs, expect my "gut feeling".

1

Nathan/Jeremy,
Neither of your hypothesis explain why the valid code is marked as an error after being edited by VS Code. Hence the slow/unreliable description.

0

Still in issue for me. Sometimes the parses messes up in the middle of a variable. So for

```

const someVar = 'blabla';

```

it might give me a warning that the variabl is not used only for  `some` (which is not correct).

 

This issue started to appear since the latest update.

2

Also we are facing massive sloweness in Intellij and our Angular project.

0

"My thinking now, considering the comments, is a slowliness introduced on large projects using Angular, especially when using HTML templates inside the .ts files."

It's not just Angular. We have a React project with about 45K LOC and I just measured how quickly the problems reported by Webstorm (2019.1.2) update compared to VS Code (1.34). One change I tested was 3 sec. vs. 1 sec., another one 15 sec. vs. 5 sec. (Admittedly, there's probably something wrong with my OS but it still seems like the percentage-wise performance difference is consistent)

2

For me I must restart the app the inspector can work otherwise it will not work...

It's so silly

0

Still unalterable slow on Webstorm 2022.1.3. Not the beefiest machine, and we use some of complex typescript features - but the codebase isn't huge. I appreciate that at some point you just have to throw more power at the problem or refactor the code to easier for the typescript service to analyze, but some diagnostic tips would be great. eg.: if webstorm detects that inspection result from the typesscript service is slow, it could ask to run some diagnostics. *Some* tooling for this surely exist?

https://github.com/microsoft/TypeScript/wiki/Performance

1

This is ridiculously slow, its now grind to a stop where I have to wait sometimes 20 seconds for WebStorm to catch up with any changes/type inference/intellisense. It has become completely unusable and I've had to switch to VS Code.

By comparison, VS Code works flawlessly.

For reference, I have a 3.6Ghz 10-core i9 Mac with 96GB Ram
I've bumped up WebStorms RAM to 8GB but it makes little difference.

If I turn off the Typescript service, everything works properly, apart from having no typescript service....
CPU usage for WebStorm is off the charts, no other application has come close to using even 20% of my CPU capacity, yet WebStorm is taking everything it can.

I've tried a bunch of different versions but no luck.
I'm currently using the latest version 2022.3

I've been using JetBrains software for almost 10 years now and this is the first time I've been forced to stop using it.

0

Rolled back to 2021.3.3 and it doesn't seem to have the same issue

0

I take that back, it just took a few hours and we're back to being at a crawl.
WebStorm is currently using ~1200% CPU, sounds pretty normal


0

I have a problem with variable names not updating quickly when changed.

For example, if you change the name of a variable, or the name used in an import statement, you'll see "Unused import specifier xxx" over and over again with each keystroke.

I tried File -> Invalidates Caches, but that didn't help. This happens almost every time.

Settings -> Languages & Frameworks
TypeScript language service : checked
 - Show project erros : checke
 - Recompile on changes : checked

I am so stressed out.
I'm considering whether I shouldn't use IntelliJ anymore.

0

Please try taking CPU snapshots (https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems) while reproducing the issue and submit them along with the logs (Help | Collect Logs and Diagnostic Data) within a support ticket

0

Please sign in to leave a comment.