Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm becomes very slow for any typescript files

Tags:

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?

like image 439
mat Avatar asked Feb 16 '16 06:02

mat


1 Answers

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
like image 124
imal hasaranga perera Avatar answered Sep 18 '22 11:09

imal hasaranga perera