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?
please try invalidating caches (File | Invalidate caches, Invalidate and restart) - does the issue persist?
Also, do you have typescript service enabled in Settings | Languages & Frameworks | TypeScript? if yes, what Typescript and IDE versions do you use?
Thank you, invalidating the caches helped a little bit. However, inspections, and clearing errors, is still sometimes slow/delayed. For example, when I make an update to an interface in a types file, then use those definitions in some code, it sometimes takes several seconds (20, 30, more?) to recognize that the type changed, and for the inspector to be happy again.
I'm on WS 2017.2.5. I'm using the typescript service with TS 2.6.2.
Try changing Typescript version to the bundled one - does it help? Typescript 2.6 includes breaking API changes that cause problems using TSServer integration; issue is fixed in 2017.3
I have noticed this issue as well and it's quite a damper on productivity. I recently just updated webstorm to 2017.3.4 and typescript inspection times have gone from 5-10s (which I thought was really slow) to almost 20s. I've tried the following:
Any other ideas?
Try disabling typescript language service - does the issue persist?
The responsiveness of inspections is certainly better without the typescript service enabled. TSC service tends to take around 10s on my machine to report the simplest type error. Without the tsc service it's close to 5s.
Please try taking CPU snapshots - https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems
also, what does your tsconfig.json look like?
https://imgur.com/a/Kg7F2 is the tsconfig.
How should I provide you cpu snapshots?
You can upload them to ftp://ftp.intellij.net/.uploads/ and let me know the file names
I uploaded them via the upload service. FTP was giving me some trouble. The zip file is named WS-173.4548.30_ryanquinn_26.02.2018_15.42.42.zip. Thank you!
Please can you provide the full tsconfig.json? What does the `'include': ` section look like?
your package.json, information about the project structure and screenshot of Typescript settings page would be also appreciated
I've uploaded the contents you've asked for under a zip file named 'webstorm_files_rquinn_2_28.zip'. I very much appreciate your time! Thank you for the help!
Please try moving "typescript" from "dependencies" to "devDependencies" in your package.json.
Also I'd suggest trying 2018.1 EAP (https://www.jetbrains.com/webstorm/eap/) - it includes some fixes in this area
Okay so I think I have a decent reproducible case where Jetbrains has major performance issues with Typescript but VS Code handles the exact same code with absolutely no problem. I'm hoping that this helps track down whatever is causing the significant performance problems with Jetbrains and Typescript.
The repo is https://github.com/kpdonn/kpd-router , it's just a messy personal repo I've been testing out some typescript ideas on so I'll give you exact step by step directions I used to reproduce the performance problem in IntelliJ and then steps to show that the same code has no problems in VSCode.
IntelliJ 2018.1 EAP
VSCode latest stable version
My understanding is the Typescript language service has built in functionality for autocomplete (among other things). It seems like that built-in functionality works very well based on how responsive VSCode is. IntelliJ must be trying to do something above and beyond the language service. I would really love it if when we select the "Typescript Language Service" option, IntelliJ delegated everything possible to it and tried to add nothing extra on top.
I'm very happy with IntelliJ when it comes to Java and I really dislike having to use separate IDEs for Java in the backend and Typescript in the frontend, but that's where I'm at right now because of the poor IntelliJ Typescript performance so I'm hoping it will be improved.
@kpd, thanks. Logged as https://youtrack.jetbrains.com/issue/WEB-31528, please follow it for updates
I got a copy of @kpd's message in my email, but it doesn't appear here. What happened to it?
@Grid T it's 'pending approval' and only visible to admins; you'll see it later
Any updates on this? I'm struggling with what seems like the same issue described here.
@Dan, if you are talking about https://youtrack.jetbrains.com/issue/WEB-31528, it has been fixed in 2018.1.2.
If not, please provide details about your issue, your IDE and TS versions, if TS service is enabled in the settings, if it gets better when it is disabled, etc.
I just updated from 2018.1 --> 2018.1.5 and it seems to be fixed! Thank you so much. This is truly wonderful news!
I am facing the same issue(slowness in autocomplete(~10 sec) and in inspection/clearing errors) with version 2018.2.1. I tried the following things but no luck -
Please help. Other developers in the team are also facing the same issue.
please create a support ticket, providing CPU snapshots taken when the issue occurs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems), `package.json` and `tsconfig.*.json` file(s)
@Neelabh, Could you provide a link to the reported ticket?
This is still not resolved in IntelliJ 2018.2.5
The problem exists both for Windows and Ubuntu and it looks like it is a known issue for people who are using TS / Angular so they are just using VS Code instead.
I am experiencing this also Webstorm 2018.2.5. It is a bit frustrating to know that a quality tool has this kind of shortcoming, especially when there is a free alternative that is lightning fast. Please fix this.
2018.3 still slow as hell in angular project.
Usually stuck when formatting html template (Ctrl+Alt+L)
@Sasha Kalmikov please create a support ticket, attaching your log folder zipped to it
@Elena Pogorelova Is there a support ticket we can track? This issue impacting our workflow and I'd love to see when it gets resolved.