High CPU usage in Webstorm

Hey guys, lately (last couple of days) I've been having times when Webstorm uses a LOT of CPU (up to 90%) making the OS really unusable. After a few minutes it usually goes down. I'm not sure if it's indexing because I don't see any progress bars or anything. 

Any tips on how to try to find the origin of the high CPU usage? Should I send a CPU snapshot while it's happening? https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems 

Thanks!


Best regards, Gonzalo

/EDIT: I tried following that guide but I can't find any "Start CPU Usage Profiling" under Tools, only the Capture Memory Snapshot. Should I enable it from somewhere?

22 comments
Comment actions Permalink

Yes, please try taking snapshots

 

>I tried following that guide but I can't find any "Start CPU Usage Profiling" under Tools

 

did you enable the profiler per instructions in https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems, Enabling Profiler Agent?

0
Comment actions Permalink

Hi Elena,
Thank you very much. I had read that wrong and I thought I didn't have to make that step, sorry! I was able to enable that function but I found the issue: the CPU hogging is due to Webstorm checking all the code for errors and I guess for completion (I realized because the markers on the right where the scrolls are was empty and slowly getting filled).

The thing is that it looks like it's being reset every time I close Webstorm, so for big projects it's now constantly indexing as I open the different files in the project.

I think this wasn't like this before, I mean, I think Webstorm remembered after it was indexed, even after closing Webstorm.

Has something changed? Or am I confused? Or something is not working correctly? Thanks in advance.

0
Comment actions Permalink

Indexing on project opening is the сorrect behavior, but it shouldn't take long time (unless it's a first time that you load the project), and files shouldn't be re-indexed on opening. Error highlighting, though, is only performed on file opening, so minor delays in updating highlighting

 

Please try taking snapshots when initial indexing (on project opening) is completed (but it still works slow), and provide them along with your log directory content

0
Comment actions Permalink

Hi Elena, thank you very much for your quick reply. Here's a screenshot of the high CPU consumption. I also uploaded two memory snapshots, one right after opening the project (when it had already finished indexing, but while it was loading the error highlighting) and the other after several minutes (I think right before I stopped the CPU profiling).

Files are:
WS-172.3544.34_GonzaloGM_08.08.2017_10.33.45.zip (59.1 mb)
WS-172.3544.34_GonzaloGM_08.08.2017_10.40.06.zip (7.7 mb)
WS-172.3544.34_GonzaloGM_08.08.2017_10.40.53.zip (134.6 mb)


I opened one file more and then kept Webstorm idle, but it kept with high CPU for around 15 minutes (without using Webstorm). Afterwards I tried opening some files and it started loading the warnings on the scrollbar, but those times it was quick. 

There were 4 files open: 200, 3000, 2000 and 70 lines long each. I should note that I use ESLint.

It's really strange to be honest, if I open several other files, and I close them and go back to the original ones, the markers on the scrollbar are gone, and they get recalculated again (even though I didn't close those files, just opened another ones).

I'm not sure if this didn't happen before, or if it was so quick and the CPU consumption was so low I didn't notice it, but it's definitely noticeable now.

Thanks for your help!

0
Comment actions Permalink

Snapshot shows that indexing is performed...

>if I open several other files, and I close them and go back to the original ones, the markers on the scrollbar are gone, and they get recalculated again (even though I didn't close those files, just opened another ones).

may be, there are some exceptions that cause indexes re-building. Can you provide your log folder content?

0
Comment actions Permalink

Oh, sorry, I totally forgot about the log folder: http://www61.zippyshare.com/v/UG1J8L8s/file.html (it's the one in C:\Users\<User>\.WebStorm2017.2\system\log right?)

0
Comment actions Permalink

Nothing interesting in the logs:(

please can you try the following:

  • shut down WebStorm, delete the log folder (C:\Users\<User>\.WebStorm2017.2\system\log)
  • restart, in Help | Debug log settings, add #com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder
  • recreate the issue, provide the generated idea.log

 

 

0
Comment actions Permalink

Thanks again for your reply, Elena. Here's the log after enabling that feature and recreating the problem. I did it twice just in case. http://www120.zippyshare.com/v/8VBSw9Ud/file.html

0
Comment actions Permalink

Looks like my previous post is pending approval (I guess because of the link). So, here's another try, just re-create the link. Thanks Elena!

Here's the log after enabling that feature and recreating the problem. I did it twice just in case. www120.zippyshare (dot) com/v/8VBSw9Ud/file.html

0
Comment actions Permalink

Hi Elena, were you able to find any possible causes of the issue? Or do you think I could try any workarounds? Maybe reinstalling Webstorm? Thanks for your time.

0
Comment actions Permalink

looks like file are being re-indexed too often - for unknown reason. Do you have any external processes touching the files? Any watches, antiviral tools, etc?

0
Comment actions Permalink

No, I don't have any watchers at all, just Webstorm open, and the Node server (+MongoDB server). I have Avast, but I just tried disabling it and it's still the same :(

0
Comment actions Permalink

Today I updated to the latest version and Webstorm wouldn't load up. I tried rebooting my laptop several times with no luck, I also deleted the system folder from Webstorm, no luck either, so I uninstalled it, downloaded last version from the website, installed it, and now everything works fine, no CPU hogging either, back to normal. 

Don't know what the cause was, but a reinstall solved it.

Thanks again for your time, Elena, I really appreciate it, even if we didn't get to pinpoint the cause :) Have a great week!

0
Comment actions Permalink

I'm going to go out on a limb here and say that there is some serious memory leaks going on here. I was up to near 661% cpu usage. The indexing was going crazy.  On one of the suggestions, I went and closed all in the project. The cpu usage went down to  13% however the memory usage was at 1.6GB. I had nothing open. How is that possible? Thinking it might be the program size, I restarted WebStorm and there its now at 600MB. This wreaks of memory leak. 

0
Comment actions Permalink

My WebStorm is using 1.5GB RAM and CPU goes up to 80% - it's a i7 and I cant event type in WebStorm as it lags like hell. 

I think I have one cure for that - cancel subscription and go back to basic Eclipse...

It's getting worse over time, now I have got "WebStorm is not repsponding".... 

I have a Bitdefender but the dev folders are excluded.

0
Comment actions Permalink

I'm having exactly the same issue lately. CPU usage up over 600% and it just gets unusable.

0
Comment actions Permalink

I have the same issue CPU is high, and I face a huge delay when typing the code. Need advise on this

0
Comment actions Permalink

Guys, please stop adding 'Me Too!' comments to old threads. High CPU usage can be caused by dozens of different reasons, there is no generic advise/fix that would help in each case. Once you face such issue, please create a support ticket, attaching CPU snapshots taken when the issue occurs. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

 

I'm going to close this thread for further comments, sorry

0
Comment actions Permalink

I have tried to update WebStorm (only reinstall was an option as otherwise it got locked instantly) and that helped. I'm not sure if it was the re-installation or a new version that helped more. I'm using WebStorm 2017.3.4 Build #WS-173.4548.30, built on January 30, 2018
JRE: 1.8.0_152-release-1024-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
And it seems to be fine now. Mem usage has dropped to 600MB and CPU is close to idle after a short while.

Since I'm using a massive JS library in the project (thousands of files) I have also excluded it from the indexing as well as the app build directories etc. (Settings|Directories -> Use Exclude button on folder)

 

1
Comment actions Permalink

As Maciej said, built javascript files can make heavy cpu consumptions on webstorm indexing. I just excluded those built codes from the indexing (my case is a react project) and ws worked well.

0
Comment actions Permalink

PHPstorm almost became unusable from all the lag, and I couldn't find out why. So I completely formatted  my HD and re-installed Linux Mint.

After re-installing all applications, I still have the same issue. High CPU usage. Even when just focusing phpstorm, CPU usage jumps up and spotify lags a little. I have a XPS13-9350 with i7 and 16GB of ram. I understand there can be many different things causing this, but I have a clean system at the moment. All I have installed are Virtualbox, Vagrant, PHPstorm, Chrome and some chat apps. Let's not ignore this problem and fix it?

0
Comment actions Permalink

@Frank Slegers

https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems and submit to the Support team for investigation (e.g. "Submit a Request" link at the top of this page) as there is no way to say what exactly is causing such behaviour on your system from your info (if it's computer/environment .. or project specific etc etc)

1

Post is closed for comments.