WebStorm becomes very slow for any typescript files
Asked Answered
C

1

22

Webstorm runs ok when I open ts files, but once I compile, the whole program becomes super slow.

I don't run watch, just simply run tsc. I also check off "enable typescript compiler" option and "resolve objects using tsconfig.json" from webstorm's preference setting, which make it slightly faster, but still unacceptable slow. I have to constantly turn off webstorm, and re-open it once i compile my app. It is super annoying.

I am wondering if any watcher running in the background? But I do check anything I can think of, anyone has the same problems?

Cortisone answered 16/2, 2016 at 6:24 Comment(7)
do you run tsc in terminal, outside of WebStorm? problem can be related to indexing js files generated by compiler. Try excluding the folder where generated files are placed from the project (Mark directory as/Excluded) - does the problem persist?Forestation
The thing is, when I open my project folder in webstorm, it is working fine. But once i compile it for preview, (i only do tsc, not tsc --watch, so I am sure no watcher is running). then it start becoming slower and slower, until i shut down webstorm and turn it back on.Cortisone
I encountered unacceptable slow when there are multiple 'tsconfig.json' in different folders with different target (ES5/ES6)Workwoman
may be helper: After I merged multiple node_modules for sub-projects into one node_modules the WebStorm looks fine with multiple tsconfig.json now.Workwoman
I am using Intellij Idea on a fast computer with tunned jvm config and Typescript is freezing slow. You are not alone @CortisoneLahey
updated to 2016.3.4 and it seems to be a bit better.Efren
two days of researchs and lots of settings later...i'm giving up of use webstorm on my machine, i will use vs code now, after my researchs and changes, its appear a typescript compiler service issue, but the web storm IDE is fighting with this issue since 2016.X version...Segmentation
R
19

Old (2016-06)

Doing following helped me

  1. Exclude dist folder and tmp folder so that webstorm will not search inside those.

Preferences->Directories->Excluded Folders

  1. Edit VmOptions

mannually

/Applications/WebStorm.app/Contents/bin/webstorm.vmoptions

or go to

Help/Edit VM Options

then change it to look

-Xms1024m

-Xmx1536m

-XX:MaxPermSize=1024m

-XX:ReservedCodeCacheSize=512m

-XX:+UseCompressedOops

Updated answer (2017-03)

  • Current Webstorm 2016.3.4 is quite good at angular, so if you have an old version first thing you need to do is to go for the latest version.

  • also if you are using an old angular-cli please update it as well because with angular 4 release they are focusing on more smaller build and faster typescript compilation.

Updated answer (2018-08)

  • Current Webstrom 2018.2 is exceptional with angular and I beleive if you are using this version and angular-cli version >= 6.1.2 you don't need to do any changes above
Rothko answered 2/7, 2016 at 19:56 Comment(5)
Does this actually make it as smooth as any other IDE or just more bearable?Uncaredfor
Intellisense in Webstorm for Angular 2 is little slow in nature, but it becomes dramatically slow when Webstorm starts to index specially the 'tmp' folder so above is quite satisfiable until we get the next Webstorm version, I'll keep replying if I found any other solutions.Rothko
tried this. Still torturously slow. Unusable for meEfren
yes, it is faster now.. I have updated the answer as wellRothko
Contrary to popular belief, not everyone in the world uses Mac OS. The file is editable in Help -> Edit Custom VM Options.Tonne

© 2022 - 2024 — McMap. All rights reserved.