Intelli J IDEA takes forever to update indices

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.


There are several answers in the Forums for different IntelliJ Versions, here is what I´ve tried (IntelliJ 13).

  • Give more Memory. Does not help anything with the 'Updating indices'
  • Delete .idea and iml in project. Does not help.

In the end what resolved my problem with 'Updating indices' was:

  • delete 'caches' folder in user/.IntellIJIdea13/system/

I tried deleting the cache and it works perfectly. Thanks for the solution friends.

Just:

  1. Open IntelliJ IDEA
  2. Select the File menu
  3. Select the Invalidate Caches / Restart... menu.
    Once selected you get a pop-up with a bunch of options.
  4. Select Invalidate and Restart
    and before doing that make sure you saved all your changes else it might delete some unsaved changes.

Once you hit that, IntelliJ will restart and then you can see that all the indexing is done really fast.


Delete caches in library folder

rm -rv ~/Library/Caches/IdeaIC15/caches/

On Mac OSX the location of cache is ~/Library/Caches


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

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:

  1. Quit IntelliJ
  2. Move the whole .IdeaIC2017.2 directory to another mount which has more space:

    mkdir /space/ideaConfig
    mv ~/.IdeaIC2017.2 /space/ideaConfig/IdeaIC
    
  3. 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.