how to disable indexing on startup

Answered

Hi all,
I am using Intellij IDEA Ultimate edition 10.5.1 and am trying to solve the performance issues as it is hanging a lot.

Can someone suggest how to disable indexing of files on startup as this is taking a lot of time on my machine?


Gaurav

20 comments
Comment actions Permalink

Hello Gaurav,

IntelliJ IDEA requires indices for most of its functionality, so it's not
possible to disable indexing. If IntelliJ IDEA hangs on your machine, it
writes thread dumps into the logs directory (Help | Reveal Logs to find where
it is). Please submit the thread dumps to http://youtrack.jetbrains.net/
so we can investigate the reason for the hangs.

I am using Intellij IDEA Ultimate edition 10.5.1 and am trying to
solve the performance issues as it is hanging a lot.
Can someone suggest how to disable indexing of files on startup as
this is taking a lot of time on my machine?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

There must be a way to stop indexing or just indexing one type of file. This slows things down drastically and you should be able to allow users to disable indexing. What is the workaround here?

0
Comment actions Permalink

Please use "preferences=>Directories=>Excluded" to exclude the directories, which are not necessary to be indexed, so that you told IDE to index the files as expected. It helps me to reduce the duration of indexing at startup. Hope, it helps u too.

0
Comment actions Permalink

Upvote for this feature request. Another use case is that I want to only use version control (git) feature of IntelliJ, without indexing. Indexing eats lots of CPU, especially when I am checkout-ing around.

1
Comment actions Permalink

It seems that re-indexing the whole project on startup is not very smart. Couldn't the indexing state be stored and reloaded so it doesn't need to be done from scratch every time and only updates would be needed?

This is a problem for my current use case where I work with a large number of projects and I need to keep switching between them.

4
Comment actions Permalink

Hello, your use case seems to be valid. please check|upvote|comment on Youtrack.

0
Comment actions Permalink

I was using only IntelliJ Ultimate, but some time ago indexing started to take so long, that I tried community edition, and on the same project it was many times faster. So when I do not need features of Ultimate version I am using community. It is a bit annoying, as sometimes it happens that I am learning that actually I need the features in the middle of work and then I have a few minutes break to swap the application and wait for indexing

0
Comment actions Permalink

Hi Jerzy Sokolowski, please raise a new issue at https://youtrack.jetbrains.com/issues/IDEA, and provide additional details as per https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems so that we could investigate your case.

Try to temporarily disable all third-party plugins.

0
Comment actions Permalink

It's extremely annoying to have to wait for indexing to start a project

0
Comment actions Permalink

Zacharias Björngren

What kind of project do you have? How long does indexing take for it on average? Is it the same for other projects?

Have you tried temporarily disabling all third-party plugins to see if it helps speed up the initial indexing process?

Indexing speed depends on whether or not:

  • files are located on network drives
  • project files and/or caches folder are scanned for viruses
  • there are deep/recursive symbolic links in project path
  • there are tools that are watching and constantly updating project directories/caches => such updating will cause constant index re-building

Also, the less files you have in your project, the faster indexing is.

There are several ways to make indexing faster in general:

For more information, see https://www.jetbrains.com/help/idea/indexing.html

0
Comment actions Permalink

The problem for me is that I mostly develop on for the frontend in my team and then I use another ide and target a deployed environment. But every now and then I need a local backend to run or debug. That is when I start IntelliJ and sometimes it can take more than a minute before I can run/debug.

I set it up to download indexes, but I’m not really involved enough to create shared indexes and have 0 third party plugins.

Also maybe there are some stupid corporate VPN/security filtering stuff messing up the download of hosted indexes because I’ve noticed that you eagerly “generate previews” of markdown, because Cisco Umbrella does stuff to images that prompts me about an untrusted certificate in IntelliJ (and it causes CSP violations at GitHub…)

Anyway, to me it feels wrong that I have to wait for the indexing to complete before I can click Run or Debug…

0
Comment actions Permalink

Zacharias Björngren

Have you tried unloading unnecessary modules from your project and excluding files and folders from indexing?

What version of the IDE are you using? You can try the latest available version 2021.3 to see if the problem is mitigated for you there.

0
Comment actions Permalink

I should be using the latest version since I started using IntelliJ just a few months ago. And since I’m primarily on our frontend I don’t know what is unnecessary or what could be excluded from indexing. I don’t even know what the indexing is for ;), I just impatient and hate waiting for it to get started. I get that I’m the exception in wanting to start running first most of the time, not start coding.

0
Comment actions Permalink

Indexing in IntelliJ IDEA is responsible for the core features of the IDE: code completion, inspections, finding usages, navigation, syntax highlighting, and refactorings.

It starts when you open your project, switch between branches, after you load or unload plugins, and after large external file updates.

Indexing examines the code of your project to create a virtual map of classes, methods, objects, and other code elements that make up your application. This is necessary to provide the coding assistance functionality, search, and navigation instantaneously.

Zacharias Björngren For a quicker startup experience, you can look into LightEdit mode and running the IDE in headless mode (CLI).

0
Comment actions Permalink

@Arina I understand indexing is a key component of the experience. Actually LightEdit mode is something I wasn't aware of and it is a good thing.
What I would expect is to get LightEdit experience as quick as possible and get the full fledged IDE loading in the background.
Most of the time, when I want to quickly open a project I just want to have a quick view at files or perform a quick edit, then probably perform a commit or create a PR, but by then the IDE should have been able to fully load (but I would not suffer from waiting anxieity)
Per-project plugins selection or modules configuration is not really an option as the overhead from going to every project and configuring it is not an option. In other jobs where I would work most of the day in one or a handful of projects, that would work, but not these days.

0
Comment actions Permalink

We are working on improving the user experience related to indexing. It's our first priority for 2022 releases. Hopefully, it would be possible to start working and run the apps when the indexing is not fully complete.

0
Comment actions Permalink

I might drop PHPStorm because of the unending indexing everytime I open it. Why can it not remember the previous index? And why it is always stuck just before the end, based on the progress bar?

1
Comment actions Permalink

Geoffrey+jetbrains Please file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with the logs attached (Help | Collect Logs and Diagnostic Data) so that we can help you with this problem.

0
Comment actions Permalink

can you please explain why PHPStorm needs re-indexing everything on each startup, over and over again? it's year 2022 with smart home, self-driving cars, AI and you are not able to store index data after first load and use it at every next startup? Please make an option to disable indexing after startup because all we need is just to use a last state of editor at the time when it was closed nothing more...thanks

0
Comment actions Permalink

Jaroslav Krenar It does not re-index on restart in most cases. If it does for you, it's a bug that needs to be reported with the logs so that we can fix it.

0

Please sign in to leave a comment.