Inspections optimization

Running PhpStorm on a laptop, including a replication of the whole server environment (nginx, mysql, php-fpm...), made PhpStorm to be slow sometimes - the CPU being at 100% for some time. So I decided to remove most Inspections and, indeed, most of the slowness disappeared. [always using the latest official PS distrib]

That was 2 years ago.

Now the laptop is upgraded, however the PhpStorm settings are still the same. That leads me to ask, since the settings are 2 years old:

- did PS change in the optimization department, and a reset of the Inspections to "factory settings" is recommended?

- is there a recommended settings page  to *not* miss the important Inspections ; i.e. have the minimum VIP (Very important Inspections for Phpstorm)

Or any other advice will be welcome, thanks.

5 comments
Comment actions Permalink

And the Plugins, of course...

0
Comment actions Permalink

Hello,

The main issue with the old settings may be the old plugins that are imported with them.

Some of them may be unsupported by newer version and/or cause performance issues.

  • did PS change in the optimization department, and a reset of the Inspections to "factory settings" is recommended?

From build to build there are a lot of optimizations but there should not be any interference with the settings.

  • is there a recommended settings page  to *not* miss the important Inspections ; i.e. have the minimum VIP (Very important Inspections for Phpstorm)

No, it is always up to you and your needs regarding inspections - whether you need each one of these or not.

If you are working with Windows, antiviral tools monitoring project and caches directories (C:\Users\Username\.PhpStorm2016.X) may also slow down the operations. Exclude PhpStorm project/library/caches directories from the monitor.

Project files on a network drive is not an officially supported scenario as well. Move them to your local drives or use "New project from existing files" wizard to create a local copy and set up auto sync. Note that you should always open that local copy afterwards, not the original remote location.

And I would recommend on checking for low free system memory (and therefore swapping) and heavily fragmented files. Drive defragmentation can make PhpStorm much faster, we have proven it on our development machines.

Finally, disabling some plugins you do not use may improve the performance.

0
Comment actions Permalink

Interesting read.

Using Linux (Ubuntu 16.04) and on SSD ( fragmentation not so much a problem).
The problem is only the CPU (plenty of RAM).

I'll review the plugins/Inspections. 

Thanks Vladimir.

0
Comment actions Permalink

If you run `top` would it be PhpStorm consuming CPU?

If that's PhpStorm you can enable CPU profiling and capture a snapshot for us to review. Here's an arctile about this: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

Btw, how exactly do you perform replication of a server?

0
Comment actions Permalink

Before invalidating a few plugins/inspections, starting PS the CPU was near 100% (real time view in 'indicator-multiload', better than 'top' for this usage :-) for a few seconds. 

Obviously, that was PS performing initialization and other stuff in the background (showing a message near the bottom that it is working). Sorry I won't put back the original config to capture the CPU consuming organs... but there is no question some plugin/inspections were operating!

Replication: well, it's not 'replication' in the DB sense (ie not a real-time replication between servers). What I meant by 'replication' is simply that the working/dev environment is a faithful copy of the production server, applications and settings. There is no automatic exchange between the two computers.

0

Please sign in to leave a comment.