Without "excluding" folders, how can I stop Indexing intellij idea on start? It's very very annoying that it starts indexing on startup without allowing you to, for example, debug a test case making you wait until indexing has finished.
-
16I let, but anyhow it's the developer who should decide his priorities, not the app. What if I have a 100,000 lines codebase, should I wait to get indexed even if I do NOT need any of the indexing results? Is it very expensive to add a switch? I definitely think Intellij Idea is a product with a lot of room for improvement with a very ironic product name.– Jaime AgudoApr 30, 2015 at 14:34
-
19I assumed that git branch switch is VERY common, I know workarounds, I did not asked for them guys. Furthermore you are losing the point trying to convince me that is needed when it's not. I can debug in many languages without blocking the UI on the IDE. And coming back to the question all this context is irrelevant, does somebody know if it's possible to stop it or not? Assume I simply don't want to waste CPU time doing something. And you should disclaim that you are Jetbrains staff, please be objective and assume criticism, nobody is perfect ;)– Jaime AgudoApr 30, 2015 at 21:25
-
12There's no way to turn off indexing except for excluding folders or marking the files as binary. We (JetBrains) are working towards making branch switching less painful, but we're not very close to it right now. Debugging without a project-wide index might be perfectly possible in other languages; but in Java it's not (or we don't know how).– Peter GromovApr 30, 2015 at 22:01
-
30Yeah it's definitely a way better to BLOCK the UI for minutes straight away without a chance to opt out. And you are losing the point, it's not a "user experience", it's a "developer experience", someone who theoretically knows the implications of his decisions and who usually likes to be free to choose when he wants to wait and take the coffee and doesn't need a pretended "Intelligent" sw decide for himself. And I understand you but your opinion is biased @PeterGromov, you are paid to promote Idea mate, please don't take it personally– Jaime AgudoMay 1, 2015 at 9:35
-
7Block the UI? That's not expected and worth profiling and reporting to the tracker (see intellij-support.jetbrains.com/entries/…). The editor/VCS should be responsive, though lacking "smart" functionality. I'm paid not for promoting but for developing IntelliJ IDEA, and from my experience people, even IDEA developers themselves, don't know well when index is required (in fact, for almost everything, therefore it's built immediately). I'm sorry for the troubles you're experiencing; providing CPU snapshots might help us fix them.– Peter GromovMay 1, 2015 at 11:13
8 Answers
You can stop synchronizing/indexing each time you switch to the IDEA and it's quite useful when dealing with big projects and outside build process which triggers indexing.
Just disable checkbox System Settings -> Synchronize files on frame or editor tab activation
.
Make sure you run indexing manually to update hints when needed through Synchronize
menu (Cmd-Alt-Y on Mac) or File -> Reload All from Disk
to run it manually for IDEA 2020 running under Linux
-
1This should be considered as the accepted answer (even for latest 2018.3.x version) since it's the only way you can control when to synchronize and not getting back from a console (e.g. when you're running a test) to a frozen IntelliJ window.– MacheJan 29, 2019 at 13:31
-
I can't remember but I believe this option didn't exist at the time I posted the question :) Feb 19, 2020 at 9:14
-
where is the
Synchronize
menu? I can't seem to find it and the CMD + ALT + Y does nothing– Ben2307Dec 1, 2020 at 17:26 -
@Ben2307 under linux it's in
File -> Reload All from Disk
. Probably they had renamed it since the post. It's mapped toCtrl+Alt+Y
for me Dec 2, 2020 at 10:06 -
4@Raghu it's under 'Appearance & Behavior -> System Settings' and now is called 'Synchronize external changes when switching to IDE...' Jan 26, 2022 at 10:09
Try:
File-> Invalidate Caches / Restart.
I think that this issue happens (at least for me it seems to be the reason) if you start commit and then close the IDE in the middle of the process.
Now, "excluding" folders is the only way to disable indexing when a change occurs in one of excluded folders (except for generated sources that mustn't be excluded).
Checked with Intellij 2016.2.5
I suggest you to tune your Intellij configuration, see this post : https://stackoverflow.com/a/22508853/779338
You Can easily resolve it.
Just Go to: File -> Setting -> Directories.
Stop all the files that are going to included and need to empty ADD Content Root.
Like This:
It may be because of libraries folder is added more than one sub folder in the project. example in my case i have node_modules folder in two locations in the project. one is under root directory(app-->node_modeules) another one is under(app-->test-->node_modules)
Simply Right click on each folder and then selected Mark Directory As --> Excluded
It resolved my problem. Hope it would be helpful.
After struggling with this issue for around a week and searching all the solution I came to below conclusion: either upgrade your intellij which gives you feature to pause the indexing ( I can't upgrade my intellij due to license issues ) so the other option was to disable all the plugins and then try enabling as per the need one by one.
After enabling any of the plugin if you see it behaving the same uninstall the plugin and download some alternative of it.
If longer indexing is an issue you can enable the shared indexes.
Add this plugin in your intellij and follow the instructions from here.
In my case i had constantly indexing files in Angular application when i remove node_modules folder.
I've tried to invalidate caches multiple times what didn't help at all.
Only solution was to remove project with clear Git state and reclone project - than everything started to work just flawlessly.