WebStorm 2021.2 Help

Advanced configuration

Besides the standard options available, WebStorm enables you to perform low-level configuration of the underlying platform and the Java runtime.

JVM options

WebStorm runs on the Java Virtual Machine (JVM), which has various options that control its performance. The default options used to run WebStorm are specified in the following file:

<IDE_HOME>\bin\webstorm64.exe.vmoptions
WebStorm.app/Contents/bin/webstorm.vmoptions
<IDE_HOME>/bin/webstorm64.vmoptions

Configure JVM options

Do one of the following to create a copy of the default file with JVM options in the configuration directory that will override the original file:

  • From the main menu, select Help | Edit Custom VM Options.

  • If you do not have any project open, on the Welcome screen, click Configure and then Edit Custom VM Options.

  • If you cannot start WebStorm, manually copy the default file with JVM options to the WebStorm configuration directory.

If you do not have write access to the WebStorm configuration directory, you can add the WEBIDE_VM_OPTIONS environment variable to specify the location of the file with your preferred JVM options. This file will override both the original default file and the copy located in the WebStorm configuration directory.

Common options

The default values of the JVM options should be optimal in most cases. The following are the most commonly modified ones:

OptionDescription
-Xmx

Limits the maximum memory heap size that the JVM can allocate for running WebStorm. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase this value, for example, to set the value to 2048 megabytes, change this option to -Xmx2048m.

-XmsSpecifies the initial memory allocated by the JVM for running WebStorm. The default value depends on the platform. It is usually set to about half of the maximum allowed memory (-Xmx), for example, -Xms1024m.
-XX:NewRatioSpecifies the ratio between the size of the young and old generation of the heap. In most cases, a ratio between 2 and 4 is recommended. This will set the size of the young generation to be 1/2 to 1/4 of the old generation correspondingly, which is good when you are often working on one project and only a few files at a time. However, if you are constantly opening new files and switching between several projects, you may need to increase the young generation. In this case, try setting -XX:NewRatio=1, which will make the young generation as large as the old generation, allowing objects to remain in the young generation for longer.

For more information about the available JVM options, see the java reference for Windows or macOS/Linux.

Platform properties

WebStorm enables you to customize various platform-specific properties, such as the path to user-installed plugins and the maximum supported file size. The default properties used to run WebStorm are specified in the following file:

<IDE_HOME>\bin\idea.properties

WebStorm.app/Contents/bin/idea.properties

<IDE_HOME>/bin/idea.properties

Configure platform properties:

Do one of the following to create an empty idea.properties file in the configuration directory that will override the values from the original file:

  • From the main menu, select Help | Edit Custom Properties.

  • If you do not have any project open, on the Welcome screen, click Configure and then select Edit Custom Properties.

  • If you cannot start WebStorm, manually create an empty idea.properties file in the WebStorm configuration directory.

If you do not have write access to the WebStorm configuration directory, you can add the WEBIDE_PROPERTIES environment variable to specify the location of the idea.properties file. The properties in this file will override the corresponding properties in both the original default file and the one located in the WebStorm configuration directory.

Common properties

Users often change the location of the default IDE directories. For more information, see Change the location of IDE directories.

Limits that can affect performance:

PropertyDescription
idea.max.content.load.filesizeMaximum size of files (in kilobytes) that WebStorm is able to open. Working with large files can affect editor performance and increase memory consumption. The default value is 20000.
idea.max.intellisense.filesizeMaximum size of files (in kilobytes) for which WebStorm provides coding assistance. Coding assistance for large files can affect editor performance and increase memory consumption. The default value is 2500.
idea.cycle.bufferMaximum size of the console cyclic buffer (in kilobytes). If the console output size exceeds this value, the oldest lines are deleted. To disable the cyclic buffer, set idea.cycle.buffer.size=disabled.
idea.max.vcs.loaded.size.kbMaximum size (in kilobytes) that WebStorm loads for showing past file contents when comparing changes. The default value is 20480.

WebStorm provides a number of other properties that define interaction with the environment (window managers, launchers, the file system, and so on). Most of them act like hidden settings (in the sense that they are not evidently exposed), which you may need to enable or disable in certain cases. Change these properties only if advised by JetBrains Support.

Increase the memory heap

The Java Virtual Machine (JVM) running WebStorm allocates some predefined amount of memory. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase the memory heap.

  • From the main menu, select Help | Change Memory Settings. In the Memory settings dialog that opens, set the necessary amount of memory that you want to allocate and click Save and Restart.

    The Memory Settings dialog opened from the main menu

    This changes the value of the -Xmx option used by the JVM and restarts WebStorm with the new setting.

  • WebStorm also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size:

    The Low memory warning

    Click Configure to increase the amount of memory allocated by the JVM:

    The Memory Settings dialog

    Click Save and Restart and wait for WebStorm to restart with the new memory heap setting.

Enable the memory indicator on the Status bar

WebStorm can show you the amount of used memory in the Status bar. Use it to judge how much memory to allocate.

Memory indicator on the Status bar
  • Right-click the status bar and select Memory Indicator.

    enable memory indicator on the Status bar
Last modified: 08 October 2021