Reporting performance problems

This article is dedicated to reporting performance problems with IntelliJ IDEs and related information to JetBrains support. You can submit a support request via Help menu in your IDE or via Submit a Request button at the top of this page.

IntelliJ IDEA and PyCharm Community Editions do not bundle Performance Testing plug-in that is required for profiling. Please install it: In Settings (Preferences) | Plugins search for Performance Testing on Marketplace tab.

IDE hangs and doesn't respond

When IDE hangs and doesn't respond so that you can't use the menu to capture the CPU snapshot, provide the thread dumps.

The CPU usage is high or IDE is slow

If you can continue working with the IDE, but it feels slower than expected or CPU usage is high:

  1. Capture CPU Snapshot

    To provide an informative CPU snapshot you should click on Help | Diagnostic | Start CPU Usage Profiling. For the first time you may be prompted to restart IDE (necessary VM options will be added) - in this case, after restarting select Start CPU Usage Profiling again.

    Then perform the actions which are causing performance problems, try to reproduce the performance problem several times while the snapshot is being recorded, then click on the Help | Diagnostic | Stop CPU Usage Profiling to save the snapshot file (snapshot is saved in the user home directory and IDE will show a notification with the exact file name, the extension of the file is .zip). If you don't see a notification and can't find the snapshot file, please check that notifications are enabled for the Profiler.

    When reporting the problem, please make sure to describe what you were doing in detail.

  2. Upload snapshot

Memory Leak or High Memory Consumption

If you can continue working with the IDE, but there is a memory leak:

  1. Capture memory Snapshot

    If the problem you are reporting is related to the heavy memory usage and frequent garbage collection, while increasing the heap size doesn't help, use the Help | Diagnostic | Capture Memory Snapshot menu item.

    To capture automatic memory snapshots when IDE runs out of memory, add

    -XX:+HeapDumpOnOutOfMemoryError

    into .vmoptions file. .hprof dump file will be created in the current working directory of the application (IDEA_HOME/bin). In case this directory is read-only, add

    -XX:HeapDumpPath=/dumps/folder

    option to change it. See Oracle documentation for more details.

    Please note, that memory snapshot may contain the sensitive source code from your project.

    jmap Binary Memory Snapshot

    Use jmap utility from the Java distribution to get shared object memory maps or heap memory details for a process. Process ID (pid) can be obtained using jps utility or your system specific process manager. Example:

    jmap -dump:live,format=b,file=heap.bin <pid>
  2. Upload snapshot

Profiling Slow Startup

If IDE is starting up slow:

  1. Capture CPU usage snapshot of slow startup

    Invoke Help | Diagnostic | Profile Slow Startup. Press Change and Restart IDE. After the restart, invoke Help | Diagnostic | Stop CPU Usage Profiling.

  2. Upload snapshot

Profiling Slow Indexing

If the indexing process of an exact project runs longer than expected:

  1. Capture CPU snapshot of slow indexing

    Invoke Help | Diagnostic | Profile Indexing. Click Invalidate and Restart (please note that Local History and Indices will be destroyed). Click Open Snapshot in ... to locate the snapshot.

    If indexing doesn't stop, invoke Help | Diagnostic | Stop CPU Usage Profiling after waiting on the indexing phase a bit.

  2. Upload snapshot

Profiling build process

Please refer to this web help page to get detailed instructions on how to profile a build.

33 comments
Comment actions Permalink

 This line no longer works on 64 bit linux:

*      *-agentlib:yjpagent64=delay=10000

The line that works is

     -agentlib:yjpagent-linux64=delay=10000

The new line is needed since at least idea-IU-117.798.  The name of the library is now libyjpagent-linux64.so.

0
Comment actions Permalink

Michael Hirsch, thanks for the correction, I've updated the document.

0
Comment actions Permalink

I'm seeing hanging too, with pycharm maxing the CPU for about a minute when it happens, which seems to be when I open a contextual menu.

0
Comment actions Permalink

I am also seeing hanging in pycharm 3.4 when using the contextual menu. Should I submit some Snapshots?

0
Comment actions Permalink

I have 8.03 on Windows and cannot save my CPU Snapshot. After I click Stop CPU Usage Profiling there is no way to save the snapshot file. 

 

0
Comment actions Permalink

Snapshots are now saved automatically and you should see a notification about that with a link to open the folder where it's stored:

2015-03-12_01-32-12_1_.png

 

0
Comment actions Permalink

Thanks Serge - I also needed to turn Profiler notifications on (they're disabled by default). I got it now though. 

0
Comment actions Permalink

I tried to run CPU profiler in webstorm 10 EAP but there is no option for Start CPU Usage Profiling

0
Comment actions Permalink

How do you disable the profiler if it is on by defautl? I am having performance problem and want to try to turn this part off.

0
Comment actions Permalink

Remove this line from the .vmoptions file

-agentlib:...

0
Comment actions Permalink

@Serge I am running an EAP .. i figured it out by going into idea.sh and setting is_eap to false

0
Comment actions Permalink

I'm unable to edit idea64.exe.vmoptions on my Windows machine...seems there's some process that's using it and not allowing me to edit it.  I've closed completely out of IntelliJ IDEA and still can't edit it.

0
Comment actions Permalink

Run your editor as Administrator, then open the file and edit it, otherwise UAC will not allow to edit files under Program Files folder for regular users.

0
Comment actions Permalink

I'm such a dummy...just got a coffee so that will hopefully help my brain work!  It is annoying that I'm running as an Admin on my PC and yet I have to grant the User group permission to modify the file...all set now...thanks.

0
Comment actions Permalink

IntelliJ is very aggressive about toString()'ing things in the debugger, and when I disabled the cache on my database to try to slim-down our memory profile, boy did that get me in trouble. Specifically, I'm using MapDB which (as the name implies) has databases that interface as java.util.map objects. As such a mapDBStoreObjectThatsInstanceOfMap.size() call, when the database isnt caching, will take a really long time.

Any chance there's a @Debugger(ignoreField = true) annotation I could put on this field or something similar?

Better yet, If I could make a feature request, it would be that whatever code is evaluating the toString of these things in the environment, does so on another thread with liberal use of timeouts.

0
Comment actions Permalink

I have webstorm 10.0.2 the latest version of web storm. Some how my CSS auto complete does not work. I can't see the auto complete of my bootstrap css and my custom css. I just recognize only html and javascript.  In webstorm version 8 is working perfectly fine. When I download the new version of webstorm, it won't work any more. What should I do?

0
Comment actions Permalink

Sam, please submit a ticket to support with idea.log (https://intellij-support.jetbrains.com/entries/23352446).

0
Comment actions Permalink

Hi Serge, 

In: Library/Preferences/

I had no WebStorm folder so I created one and copied the webstorm.vmoptions file to that location.

Restarted webstorm.

I was supposed to get the tools "Start CPU Usage Profiling and Capture Memory Snapshot".

I only have "capture memory snapshot" which was present from the beginning.

Thanks / E

0
Comment actions Permalink

You are looking in a wrong folder, search for the existing one, it's under ~/Library/Preferences, not /Library/Preferences. ~ stands for /Users/<user name>, so the actual folder is under /Users/<user name>/Library/Preferences.

0
Comment actions Permalink

Is it possible to capture CPU Snapshot automatically? I am requested to do so but I am unable to save snapshot because IntelliJ will hang indefinitely once the issue happens.

0
Comment actions Permalink

Martin, in such cases you should provide a thread dump instead: https://intellij-support.jetbrains.com/entries/23348667 .

0
Comment actions Permalink

This IDE is the black sheep of the JetBrains family. I have a super-powerful computer and the Webstorm stumbles like a cow in a bucket.

0
Comment actions Permalink

The instructions to locate vmoptions file can be found here:

 

https://www.jetbrains.com/pycharm/help/tuning-pycharm.html

0
Comment actions Permalink

http://i.imgur.com/mPer0nQ.png

????? ???? ???? ?????????

OSX ws 10

??? ????? ?? ??? ??????????? ??? ?? ?????? ?

????????? ???????? ??? ?????? ?? ???? ????? ????? ?? ???? ????? lightweight https://i.imgur.com/2QTOixc.png 

0
Comment actions Permalink

Serge Baranov, ?????? ? ???? ??????????? ???? ?????? ? :)

 

0
Comment actions Permalink

Please submit a ticket to support with a memory snapshot.

0
Comment actions Permalink

Serge Baranov

??? ??????????. ????????? 

1) ? ?? ??????, ? ????? ????????? ?????? ?? ??????????

2) 40 ???????? ? ???? ???????? ??? ????

3) ????? ?? ?? ???? ?? ?????? ? ????? ??????? ??????. ??? ???? ? ???????? ???? ?????, ? ???? ??? ??????.

0
Comment actions Permalink

I believe OS X needs this line instead (for the YourKit I downloaded today):
-agentpath:libyjpagent.jnilib=delay=10000

But IntelliJ IDEA still doesn't have extra options in the Tools menu...

0
Comment actions Permalink

Luke, make sure you've added it to the correct .vmoptions file per https://intellij-support.jetbrains.com/entries/23395793 . Note the Mac OS X specifics (modify a copy of the original file). Check idea.log to ensure that profiler agent was loaded. YourKit agent is already present in the Ultimate Edition. If you are using Community Edition, you need to connect to IDE via profiler UI, there will be no buttons in the menu.

0

Article is closed for comments.

Have more questions?

Submit a request