Features Releases

Power Save Mode in PhpStorm

It is no secret that PhpStorm’s CPU usage can be quite high at times. This is primarily caused by various code insight features including auto-completion, syntax errors checking, intention actions and on-the-fly inspections. These processes are always running in the background and can be CPU-intensive.

When the CPU performance is a bottleneck, or if you work on a laptop without a power supply and want to get several extra hours of battery life, PhpStorm has got you covered.

Several options exist, which you can apply with the help of Hector the Inspector.

To start, click the Hector icon in the PhpStorm status bar:

hector

By default, the highlighting level is set to Inspections, and the full range of background operations runs as you type. When you set it to Syntax, no warnings other than syntax errors will be reported, and your laptop’s CPU usage will be notably reduced:

highlight_level_syntax

When you set highlighting level to None, syntax errors will be ignored as well, and CPU usage will be even lower. Hector will turn his face away, and the code analysis icon in the editor’s top-right corner will be set to OFF:

editor_highlight_off

Changing the highlighting level is only applied to the current file. If you work with several files, you will need to disable the inspections and syntax highlighting for each of them individually, which certainly is a tiresome task.

In this case, simply use Power Save Mode, which will disable all inspections and other CPU-intensive tasks application-wide. The PhpStorm functionality will be reduced to the one of a text editor, but you will get the most life out of your laptop battery.

To turn Power Save Mode on, click the Hector icon and select the Power Save Mode checkbox:

power_save_on

Note that the Hector icon fades out in the PhpStorm status bar:

hector_faded

As is the case with the majority of the PhpStorm’s actions, you can turn the Power Save Mode on in a matter of seconds with the keyboard. Simply invoke the Actions Search by pressing Shift+Command+A (Shift+Control+A on Windows), type ‘Power’, press Enter, and enjoy several extra hours of coding:

power_save_action

If enabling Power Save Mode doesn’t help, or if you simply believe that there’s something wrong about those CPU spikes, capture your CPU usage snapshot and share it with our support team as described here.

Your JetBrains PhpStorm Team
The Drive to Develop

image description