Reputation: 21311
Is it normal for Intelli J to take a lot of time (almost 12 hours) to update indices for a project? I just installed Intelli J on my machine and imported a rather large Maven project (13k+ files).
I understand that the project is large but I let my computer up all night and when I woke up in the morning, Intelli J still hasn't finished updating the indices for the files yet, which makes it impossible to do anything since the popup with title 'Updating Index' keep hanging there in the middle of the screen.
Upvotes: 210
Views: 195372
Reputation: 31
I had a similar issue with IntelliJ and 5 huge projects.. The solution for me was that IntelliJ was automatically opening 5 projects and windows at once. All of them started indexing at the same time, overwhelming my computer. When I closed the windows and started opening them one by one (open, wait for indexing to complete, then open the next), the entire process took less than 10 minutes (infinity indexing before).
Here's a short instruction to follow:
This approach should significantly reduce the indexing time.
Upvotes: 0
Reputation: 2576
I had to remove .idea
folder. (You can do a move to .idea_backup
if you want to be safe). This forced idea full refresh of the whole projected and it worked as expected. The other suggestions to clear Invalidate Cache did not work for me.
Upvotes: 2
Reputation: 11
File -> Invalidate Caches / Restart doesn't work for me
solution that work for me:
delete or edit
/home/user/.config/JetBrains/RubyMine2023.3/options/filetypes.xml
Upvotes: 1
Reputation: 147
Just had the same issue with 2023.3 on Linux Mint.
"Repair IDE" and "Invalidate Caches" didn't really help.
But after updating Plugins manually and randomly restarting the IDE, it solved the problem.
Also, inbetween, I did check off and on this checkbox and restarted again:
So not sure what exactly helped here.
Upvotes: 0
Reputation: 375
Follow below steps to resolve Intelli J IDEA takes forever to update indices
1.Open IntelliJ IDEA
2.Select the File menu
3.Select the Invalidate Caches
4.Once selected you get a pop-up with options.
5.Click on Invalidate and Restart
Upvotes: 8
Reputation: 71
So, for all of you that are still in pain because of this when using Windows (with or without WSL) you can try this: https://youtrack.jetbrains.com/issue/IDEA-293604/IntelliJ-is-hanging-during-build-process-and-indexing-process-when-working-on-the-WSL-projects.#focus=Comments-27-6427409.0-0
Windows defender can be very demanding with these things. Excluding idea64.exe
process just made everything fast again for me.
Upvotes: 0
Reputation: 1128
I was able to solve this by going to File -> Invalidate Caches / Restart
Then on the dialog that opens select "Invalidate and Restart"
Upvotes: 11
Reputation: 31
IDEA 2020.2 Right click folder under the Project, then mark as Exclude to exclude folder that you don't want to index
Upvotes: -1
Reputation: 17
~/Library/Caches/JetBrains/IntelliJIdea2021.1 it's works for me..
Upvotes: -1
Reputation: 1
you can manually exclude file or directory withIDEA Indexing, it can improve file load speed. some files are generated dynamic, we don't need index these files every time when we start IDEA.
Upvotes: 0
Reputation: 2963
In Intellij 2020.2
I faced this problem too. Restart/Invalidating cache didn't work for me. What I did was just deleting the cache folder in the following path:
C:\Users\davoud\AppData\Local\JetBrains\IntelliJIdea2020.2
Upvotes: 20
Reputation: 31
the easier way is as follow: file --> settings --> (uncheck) Synchronize files on frame or editor tab activation.
Upvotes: 3
Reputation: 16842
I guess Idea is more collecting garbage than doing useful work. Use G1 GC instead of the default.
Help -- Edit Custom VM Options
-XX:+UseG1GC
instead of
-XX:+UseConcMarkSweepGC
and of course restart Idea.
Downside: G1 tries to collect garbage before stopping the process. This is insane, but this is what it does. For a program with 16G of heap, cleaning-up took 27 minutes. So do not configure your Idea to use a 16G heap.
Upvotes: 1
Reputation: 149
probably - old bug in caching system. it happens in ALL versions, especially if you upgrade your version of IntelliJ or JDK. To fix it: 1) close the GUI. 2) go to %HOME_DIR%.IntelliJIdeaXXXX\system\caches and delete it 3) start the the GUI again.
Upvotes: -1
Reputation: 2119
Though the accepted and other answers may fix a particular problem, I have found that the problem with very long indexing times often comes from the fact that a repository contains or links to some directory that contains a large number of files. Often this is done for testing and the directory in question is not actually part of the project, e.g. ignored by the VCS.
The IDE does not automatically ignore those directories when indexing, but it is possible to "exclude" the directory from the project. This will prevent indexing as well.
Upvotes: 2
Reputation: 31
I had the same problem with IntelliJ 2017.2.3 - i.e. my project would keep updating indexes over and over again.
I discovered that I had gone over my disk quota in my home directory. By default IntelliJ stores the indexes in the home directory like this:
~/.IdeaIC2017.2/system/index/
The solution for me was to:
Move the whole .IdeaIC2017.2 directory to another mount which has more space:
mkdir /space/ideaConfig
mv ~/.IdeaIC2017.2 /space/ideaConfig/IdeaIC
Update bin/idea.properties
to point at the new index/config location:
idea.config.path=/space/ideaConfig/IdeaIC/config
idea.system.path=/space/ideaConfig/IdeaIC/system
It is possible that some of the other answers to this question were due to the same problem and were inadvertently fixed by "deleting caches folder", "invalidating caches" etc which would have potentially freed up enough disk space to build the indexes.
Upvotes: 3
Reputation: 51083
Delete caches in library folder
rm -rv ~/Library/Caches/IdeaIC15/caches/
On Mac OSX the location of cache is ~/Library/Caches
Upvotes: 25
Reputation: 1491
I tried deleting the cache and it works perfectly. Thanks for the solution friends.
Just:
Once you hit that, IntelliJ will restart and then you can see that all the indexing is done really fast.
Upvotes: 143
Reputation: 2061
There are several answers in the Forums for different IntelliJ Versions, here is what I´ve tried (IntelliJ 13).
In the end what resolved my problem with 'Updating indices' was:
Upvotes: 195