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?

41 comments
Comment actions Permalink

@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
Comment actions Permalink

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
Comment actions Permalink

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

2
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

"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
Comment actions Permalink

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

It's so silly

0
Comment actions Permalink

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

0

Please sign in to leave a comment.