简体   繁体   中英

WebStorm uses 100% CPU

I use WebStorm 11 and developing in Angular2. The ng serve is working on background from the cmd and the CPU is on 1% work.

When the WebStorm is opening, the CPU jump to 30%-60% and when he start indexing it goes to 100% until the WebStorm crushes.

  • I have Intel(R) Core(TM) i503210M CPU @ 2.50GHz 2.50GHz and 8G RAM (I don't have RAM problem).
  • I excluded dist and node_modules folders but the indexing still takes too long.

WebStorm.exe.vmoptions:

-server
-Xms128m
-Xmx1012m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
  1. What does the indexing do? Can I turn it off?
  2. What is the best way to configure this for small projects?

For people that aren't already, make sure you aren't indexing your dist or www folders.

Right click the folder -> "Mark Directory As" -> "Excluded".

Saved me!

What does the indexing do? Can I trun it off?

The index process creates a database of your code, enabling fast searches, code completion, symbol lookup, etc. I don't think you can turn it off, but if you did, WebStorm wouldn't be very useful to you anyway.

This is a well-known issue with WebStorm, but has gotten better with recent versions. See also: https://www.themarketingtechnologist.co/webstorm-10-improves-the-performance-of-indexing-files/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM