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:
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:
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:
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:
Note that the Hector icon fades out in the PhpStorm status bar:
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:
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