Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm choking and freezing while editing code

Tags:

phpstorm

I have experienced sudden drop in PhpStorm performance. IDE which was performing very well (without any noticeable signs of delay in response) started to be sluggish and freeze for a fraction of a second every time any autocomplete was performed.

Despite available 16GB memory (and increasing max memory for program in PhpStorm settings up to 2 GB) IDE does not use any of the additional memory and still freezes every few second. None of available suggestions all over Internet regarding disabling unnecessary plugins, clearing indexes or changing memory were successful. Reducing highlighting level has no effect on described issues.

Question: is there any other option I could do to restore normal performance without disabling some vital IDE functionalities?

like image 830
Perfect Square Avatar asked Jul 17 '16 04:07

Perfect Square


Video Answer


2 Answers

I have managed to identify cause of sudden drop in performance described in question. The reason behind this was adding to project Gulp libraries which seemed to be more than PHPStorm could index in real time.

Solution: exclude node_modules directory from indexing. To do this go to Settings > Directories, select node_modules and mark it excluded. Your PHPStorm performance should return to normal.

like image 161
Perfect Square Avatar answered Oct 21 '22 18:10

Perfect Square


I was also getting this problem but node_modules was already excluded (I think PHPStorm does this by default).

I have just excluded the location of the compiled files as well. In my case this was the entire public folder. (Using Laravel and Elixir.)

This solved it for me.

Mick

like image 34
Mick Avatar answered Oct 21 '22 19:10

Mick