Unnecessary re-indexing on start-up and project opening

Hello! 

I am just wondering what is the reason for re-indexing of a whole project each time I launch the IDE or open a project even in case there have been no changes to any of the files since previous re-index? It takes very long (5-10 minutes) and consumes 100% of all CPU cores. 

7 comments
Comment actions Permalink

As a starting point, could you please confirm if you have any custom plugins installed & enabled?

0
Comment actions Permalink

Just disabled all of them (as well as some of the bundled). Restarted the IDE, and encountered the same behavior - long and painful re-indexing. 

0
Comment actions Permalink

Please tell more about your project, are there any files that can be changed externally or with some 3rd party tools?

What OS do you have, is there any chance that the project is located on a network share? Also, I was wondering if you have ever tried running "Invalidate caches" operation.

0
Comment actions Permalink

Well, this happens disregarding of the types of projects. Most of them are Yii2 applications with the respective vendor directory contents. But the same problem happens to Vue projects and even plain html projects (which get indexed much faster but still are re-indexed at each and every project opening or IDE restart).

I have Xubuntu 18.04, PhpStorm is currently 2019.3, but previous versions behave the same way. All files are on local disk and don't get changed with anything external.  I've never invalidated any caches. But even if I would, I assume that re-indexing should be done just once after dropping of the cache. 

Could you tell me more details of how phpstorm decides to start re-indexing? 

UPD. Just looked into idea.log and found many entries like this:

Reindexing refreshed files took 44351ms; general responsiveness: 5/39 sluggish, 18/39 very slow; EDT responsiveness: 4/27 sluggish, 1/27 very slow
Reindexing refreshed files took 48434ms; general responsiveness: ok; EDT responsiveness: 10/49 sluggish, 2/49 very slow
Reindexing refreshed files took 48864ms; general responsiveness: ok; EDT responsiveness: 6/48 sluggish
Reindexing refreshed files took 33796ms; general responsiveness: ok; EDT responsiveness: 4/34 sluggish, 1/34 very slow

So the main question is what the IDE considers to be "refreshed files"?

0
Comment actions Permalink

Same on my machine. Using Windows 10.2004 latest PHPStorm. I have plenty plugins installed. This is especially nagging on very large projects. But, PHPStorm takes also long time to index scratch files.

0
Comment actions Permalink

Please take note that you may mark some folders as "Excluded" to keep these away from indexing.

It could be extremely useful for any non-code specific files that tend to be changed often like caches or logs. 

0

Please sign in to leave a comment.