IntelliJ IDEA is a popular IDE for programming languages.

When you open an existing maven or gradle or npm project in IntelliJ IDEA, It starts updating the index at startup for a couple of minutes and IDEA will not respond and is unstable. Usually, If it is a new project, the index takes a longer time, Next opening the project only updates the index for the files that were added/deleted.

IntelliJ IDEA index issue forever

Sometimes, Indexing takes a longer time, and the user is unable to do any operation in IDEA.

The below steps are required to improve the index update.

  • Invalidate cache

    Go to the File menu and choose the Invalidate Cache or Restart option.

If the above steps do not solve the issue, follow the next steps

  • delete the .idea and iml files in the project folder

  • Increase memory in IDEA

  • disable third-party plugins

  • You can also exclude the folder in the current project

Goto File -> Project Settings -> Modules -> Sources