Why it's updating indices again and again? making it unusable at all
Answered
The ide is "Updating Indices" of JDK, 3rd jars, .gradle/ folder etc again and again and again when openning the project. It takes too long time, and cannot be canclled. Making IDEA totally unusable, very very very annoying!
This happening in all versions of idea with gradle plugin.
This feature must be improved, some suggestions:
(1) do not index the same thing more than once
(2) let user to define the exclude-set of indexed folders
(3) do not index unused stuffs; try to identify which are unused
(4) do not block user operations when it's indexing
etc
Please sign in to leave a comment.
I managed to solve this by disabling `Settings (Preferences on macOS) | Editor | Inspections | Java | Probable bugs`
I have the same issue on last versions (current 2020.2). I see that most of the time is due to indexing jar of plugins installed even if the plugin is not used in the current project. Several questions here:
- seems jar are indexed seveal times
- why indexing plugins not used by the project ?
- why not providing plugins with an index ?
regards,
Jphautin please share idea.log after adding
#com.intellij.util.indexing.FileBasedIndexImpl:trace
in Help | Diagnostic Tools | Debug Log Settings and reproducing the caseUsing IntelliJ 2020.2.3 Ultimate Edition on Windows 10. Had 4 Kotlin projects and 2 Java projects open when my machine turned off (power outage). Upon reboot, I opened IntelliJ and now it's been "Updating indices" for approximately 2.5 hours. :^o
There's no option to cancel or do it in brackground. That's poor UI design: any long-running task should allow the user to pause, cancel or run in brackground.
Acoording to other messages, if I kill the process it will resume with the indices updating when I reopen IntelliJ. :^(
I had the same issue. Datagrip would go crazy scanning all in particular all files and folders in Library (why?) forever on my Mac and a lot of these subfolders actually links back to Desktop, Downloads etc... through eq Library/Containers/com...../Data/Desktop (link).... so guess looping there.
I wondered why it would scan all of Library but then went to View-Tool Windows-Files and saw it was in "Library"... dont know why and how it got there?
But I right clicked and selected Detach directory from Project, then Files window switched to Scratches and Consoles showing my Database Consoles etc.
Restarted Datagrip and it does not start scanning everything again in Library.... :-) :-)
So seems to be caused by Library (or something else) ending up in Files as attached to the Project.
I am not so much into the project structure/tools here but "Files" do not appear to be in IntelliJ, PyCharm etc in View-Tools Windows but maybe it has a similar wrong directory attached?
Please report issue on YouTrack: https://youtrack.jetbrains.com/issues/IDEA attaching logs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) to investigate the issue.
It would be very nice to actually be able to use the latest IDE but instead I had to install the latest 2019 version to get the application to run without long indexing times. Without any changes to my JDK, code, or plugins, opening and running the code in IntelliJ Community 2019.3.5 takes a matter of seconds. When trying to run it on the latest version (2020.3.3), it gets hung up when trying to execute the code as it's saving caches. When trying to run it on the earliest version provided by JetBrains Toolbox (2020.1.4) it never even allows me to run the code as it is stuck indexing when opening the IDE. Might be time to switch to Eclipse or just code everything in VSCode. Seems like a better option to running an outdated version of IntelliJ at this point with what seems to be no hope for a fix any time soon.
Cory Dorfner
Please contact support at https://intellij-support.jetbrains.com/hc/requests/new with the logs attached (Help | Collect Logs and Diagnostic Data) so that we can help you. In some cases this issue is caused by the third-party plug-ins.
I´m occasionally facing the same issue, but only with some projects.
With one of them (Gradle multi-module project with root module + 3 child modules) I did an invalidate + restart, after Intellij had set the whole file system (C:// !!) as the content root of the root module and indexing that for hours and I manually removed that, which must be another bug on its own!
Now it´s in an indexing endless-loop, starting with indexing the project dependencies and from there going to the JDK 1.8 root and then the global .gradle folder in ~myuser/.gradle/ and after that restarting again and again.
The version I´m using is 2020.3.3, but I know this issue for a long time now.
@Marianklueh Please contact support at https://intellij-support.jetbrains.com/hc/requests/new with the logs attached (Help | Collect Logs and Diagnostic Data) so that we can help you.
Totally feel the indexing pains, every time I need to rebuild my codebase it runs indexing for at least an hour making the IDE unsuable....
Nick Goupinets
In order to investigate the issue you are having, please submit a new ticket to our tracking system and attach logs to it collected via Help | Collect Logs and Diagnostics Data. Thank you.
This problem still exists in latest 2021.1.
I found it is very likely to happen when there are several IDEA instances. All instances will rebuild at the same time, especially rebuild index of JDK11.
If I close other instance and left only one, it will still repeatedly rebuild indexes. The only one solution is close all instances, and reopen them.
This problem is very annoying, hope it can be resolved soon.
Minglei Lee Please raise a new issue at https://youtrack.jetbrains.com/issues/IDEA , and provide the IDE logs for the investigation. (Help | Collect Logs and Diagnostic Data)
I understand this is neccessary for WebStorm to perform its magic, but somebody in JetBrains has to look at the big picture here. And the realitry is, with big projects, the constant indexing and reindexing turns the IDE a headache to use, just like Eclipse back in the days. There has to be an easy way to turn most things off. Many times it is not needed to index a lot of things, like node_modules. The pause button is a joke, if you pause, then nothing works ... Also, latest versions introduced this "Git Log Reindexing" thing, another 5 minutes for me.
Constant indexing is a bug that has to be reported at https://youtrack.jetbrains.com/newIssue?project=IDEA with the logs attached. It should not happen. The proper report is the only way we can fix it. Thank you and sorry for the inconvenience.
I am noticing this bug as well. I don't understand why IntelliJ is doing this.
I just opened IntelliJ after installing a Windows 10 update, and IntelliJ begins by launching three windows that were closed before. And that would have been fine, except for some reason it decides to do the "Reindex Everything"
And by everything, I mean the entire project structure, generated code, which is obvious.
However it also does it for Local Maven Repo as well as the JDK (which I havn't reinstalled!).
This really needs to be looked into. People are wasting hours just watching IntelliJ reindexing, and it's a bit embarrasing to have to reassure someone "It'll be done in a few minutes, please be patient IntelliJ just does this sometimes... I know it's weird, I don't get it either."
Please report as described in my comment above yours. Thank you.
A year later after last answer I still searching for a solution of this problem. Even latest ultimate Idea with "downloading shared indices" still stops my work almost every time I restart my computer.
Your product is great and amazing, but this problem is so annoying, I have to prevent my laptop from switching off and have to keep opened projects (it consumes most part of the RAM)
>And by everything, I mean the entire project structure, generated code, which is obvious.
>However it also does it for Local Maven Repo as well as the JDK (which I havn't reinstalled!).
Same here, with the latest version (2021.2, Ultimate Edition)
Also same here for (2021.2, Ultimate Edition)
Some times when needing to make a chance the indexing takes so long I just do the change in vi !!!
Can someone tell me how I can capture logs or other debug info that I can share
IntelliJ IDEA 2021.2 (Ultimate Edition)
Build #IU-212.4746.92, built on July 27, 2021
Runtime version: 11.0.11+9-b1504.13 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.15.7
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Non-Bundled Plugins: com.intellij.plugins.watcher (212.4746.52), com.intellij.kubernetes (212.4746.57), com.dubreuia (2.2.0), Pythonid (212.4746.92), org.jetbrains.plugins.go (212.4746.92), aws.toolkit (1.29-212), com.google.gct.core (21.7.1)
Kotlin: 212-1.5.10-release-IJ4746.92
I have tried invalidate cache and restart for these projects
Every time I opened my project, it will take 2-8 minutes to index lib and jdk like things, and sometimes downloads "cached index".
Is there any way to cache the index? Not building it on every time I open the project.
New IntelliJ release (2021.2.1), issue still existing...
After going through all those 7 stages of grief, you eventually just learn to accept it (or may be just switch back to Eclipse? :)) Overall it is not such a bad thing to be able to complain to colleagues about something like half-an-hour indexing from an IDE?
Serge Baranov I did submit a ticket with logs as requested. However is this bug where IntelliJ reindexes everything on start up being looked into? It's the entire Maven repo, its the JDK, etc... That seems excessive. Especially since newer versions of IntelliJ sells themselves on the Shared Indexes that are downloaded - they don't seem to be doing anything.
If you submitted a bug for this problem with the logs, it's being worked on and you should see updates in YouTrack. You can ask your questions there instead so that developers working on this issue can see them. They do not read this forum. By the way, what's the bug ID so that others can follow it?
This permanent reindexing after each project opening is killing when you work with multiple micro-services. Everything is used to work but some latest releases changed this. Each time I have to explain something in code and open a project we have to wait at least a few minutes while the IDE gets usable. Considering the answer of support (it's ok on my PC) the solution is figure out when the problem appeared and downgrade IDEA. "Perfect" software, lol
This issue is already reported to us.
Please follow: https://youtrack.jetbrains.com/issue/IDEA-275337
Had the same problem with 2020.3 (permanent reindexing even after invalidate cache and restart)
This started after I quarantined some files with my antivirus. After restoring the files from quarantine Intellij worked again normally. (Files were from outside the project directory -> AppData/Local/Google/Chrome files)
So apparently the issue was that if Intellij can't read/interact with a file due to it bein in quarantine, it flags indexing as unsuccessful and goes into a permanent loop.
Javid Asgarov
Could you please update to the latest version and check if the issue is still there? If it is please file a ticket and share log files with us