PhpStorm keeps indexing over and over again

已回答

PhpStorm keeps reindexing over and over again.

Tried to restart the app, but wouldn't solve the problem.

16

I'm still having this same problem. The darned thing keeps indexing, and it's starting to drive me a little nuts. I updated to 2020.1.2 this morning, but it's still doing it. I'm in the middle of typing some code, and I don't see it on the screen. Then I look down and the thing is indexing again. Why? I've done the invalidate caches, deleted the .ideas directory.... I'm on MacOS 10.15.4. 

0

remy.courteaud How/where can directories and files be excluded?

0

Pweil2 Maybe try to mark files or directories as excluded that don't need to be analyzed (like logs or builds).

On mac => Right click => mark directory as => excluded

Or through settings => Settings => Directories

0

Rémy

Thanks, I'm giving this a try. But some of my exclusions are just guesses. Does JetBrains have a general recommendation for excluding files in certain kinds of projects (mine is a Laravel/Vue app). I've been using PHPStorm for several years, and have never come across this problem before.

0

Pweil2 When I had the indexation issue (long time ago) the indexation wouldn't stop for a second. I guess if that's your case to there might be something else going on... Also I guess it depends on your computers CPU and RAM. In my projects (Symfony/ Webpack) I exclude all vendor directories, logs directories, and build directories (JS that constantly gets recompiled during developpement) because they will cause a lot of reindexation and I don't need IDE analysis (syntax and stuff) on these.

0

Cardinal solution.
Resetting the cache didn't help me either.
But removing the following storm directories helped:

  • BEFORE DELETING, MAKE A BACKUP OF DIRECTORIES DATA!
  • If you keep your projects there, do not delete project files!
  • After removing, I lost some PHPStorm settings, but for that I can continue working on the project.
  • C:\Users\{UserName}\PHPStorm ...
  • C:\Users\{UserName}\AppData\Local\JetBrains
  • Be careful
0

This is incredibly surprising that the indexing issues have been persisted for 6years. I feel sad that I recommended buying this product in my company and now everyone in my team is just frustrated with this indexing issue despite having the latest version installed. All I see everywhere is "Invalidate Cache and Restart" but it does not work. Some solutions say Exclude the directories but still indexing happens every time. I have to keep the indexing program running overnight so that I can use the IDE next morning.

Sad part is if you don't index then Search doesn't work either.

1

There are no perfect products. PHPStorm the best I've seen and not expensive.
And the problem can be solved, described in a previous comment

-1

That's odd we use PhpStorm in my company on many different computers with no issues.

0

Garad U, please contact support whenever you have issues, we can't fix a problem we are not aware of. Submitting your logs (Help | Collect Logs and Diagnostic Data) via Help | Contact Support is a good way to start. Thank you.

-1

THIS FIXED IT FOR ME (MAC User)

The problem was that my projects were under the "Documents" folder. I moved them in my home folder and that fixed it.

I can't believe I was plagued by this problem for months and the solution was so simple.

why? (my speculation, didn't do proper research)

In recent macOS, Apple did something to protect some folders like Desktop, Downloads, Documents (you surely noticed that asks permissions for apps accessing files in those folders). This something probably causes the problem, as PhpStorm maybe isn't able to read its files in some edge case. Don't know why it happened only with PhpStorm and not WebStorm for example, maybe someone will explain the correct reason and everything will be clear

 

6

An alternative to the above without moving your folder is to grant the Rider application "Full disk access" in System Settings -> Privacy & Security. This worked for me in JetBrains Rider (I have not tested PHPStorm though, but I assume it would work as well), however similarly to the above, it doesn't happen in WebStorm.

1

Invalidate cache/restart is a workaround, not a fix. If may fix it for a while, but it always goes back to reindexing everything everytime I reopen a project...thinking about switching to other tool because of this, causes too much load and slowness

0
Matttzu1, there were some issues with indexes consistency in 2022.3, but they are supposed to be all fixed in 2023.1. Please check how it goes there for you: https://www.jetbrains.com/phpstorm/nextversion/
Please note that it's expected that PhpStorm will index all projects anew when you install it - we always do that on major upgrades.
0

Nope still not working. Upgraded last evening, it reindexed everything, this morning I start same project and again it indexes everything....SSD killer, time killer, nerves killer.

1

Matttzu1, could you please share the logs (Help | Collect Logs and Diagnostic Data) using our uploading service, and also specify the name of the affected project?

0

Boa noite meu povo! Eu já perdi tanto tempo com isso toda vez que ia retomar o projeto ficava vários minutos indexando... Não vai adiantar nada vocês irem somente na opção invalidate caches & restart se você não sinalizar como EXCLUDED a pasta /vendor e/ou /node_modules

RESOLUÇÃO: Abra o PHPSTORM e clique em cima da pasta /vendor com o botão direito do mouse, vai abrir um menu e você deve escolher a opção: MARK DIRECTORY AS -> EXCLUDED! Prontinho agora faça o mesmo para o diretório /node_modules

Estarei anexando junto a essa resposta um print de como fazer isso, grande abraço!

Casimiro Rocha.

0

Good day, everyone,

today was updated my PhpStorm to 2023.3 version. And my laraver project keeps indexing in loops. This is not a new project, I'm working on it for a few months now. Indexing is going always on the vendor folder. I tried these actions:

  • Invalidate cache and restart
  • deleted .idea folder
  • market vendor folder as excluded

 

PhpStorm 2023.3
Build #PS-233.11799.232, built on December 1, 2023
Runtime version: 17.0.9+7-b1087.7 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.0.0-37-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4000M
Cores: 8
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins:
 com.intellij.ideolog (203.0.30.0)
 com.alicannklc.laravel.snippets (1.1.1)
 ru.adelf.idea.dotenv (2023.3)
 de.espend.idea.php.annotation (8.3.0)
 fr.adrienbrault.idea.symfony2plugin (2022.1.239)
 com.dmarcotte.handlebars (233.11799.172)
 com.github.jk1.ytplugin (2023.1.40)
Current Desktop: XFCE

Added logs and diagnostic info

Upload id: 2023_12_07_23GqrjU243qJ1DDem99e38 (file: phpstorm-logs-20231207-12005311902125295933066137.zip)
 

0

EDIT: Symfony plugin update fixed this for me.

 

Keeps indexing here as well, in my 2-year-old symfony project. Today, AI Assistant was added and revealed, but it is disabled.

Cleared FS cache and local history, vendor is excluded.  Did not help.

PhpStorm 2023.3
Build #PS-233.11799.232, built on December 1, 2023
Runtime version: 17.0.9+7-b1087.7 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.2.0-37-generic
GC: G1 Young Generation, G1 Old Generation
Non-Bundled Plugins:
Current Desktop: ubuntu:GNOME

0

Re-open the project, that is fixed on my end.

0

Got same issue now with:

  • PhpStorm 2023.3.1
  • Build #PS-233.11799.297, built on December 11, 2023
  • Runtime version: 17.0.9+7-b1087.7 amd64

There is no snap update available, also cache clear is not working. My pc behaves as if it's about to lunch a rocket.

 

Any way to solve that?

 

Nvm… in my case I also had to update the plugins and it worked…

0

请先登录再写评论。