Prevent folder from being indexed
Answered
I'm trying to stop Rider indexing files from a /dist folder. This folder is not included in any project, but it is being constantly re-indexed anyway.
I tried adding an entry to Editor > Inspection Settings > Elements to skip > Files and Folders (like in this screenshot) but I can still see the files being indexed in the the Background Tasks list at the bottom of the screen.
At this point, Rider is pretty much unusuable for me due to the amount of CPU it's requiring.
How do I prevent my /dist folder from being indexed?
Please sign in to leave a comment.
The following is expected to work:
1. Show all files
2. Select folder, right click -> Exclude from Index
I will file a request to disambiguate this IDEA index from the one in Settings.
https://youtrack.jetbrains.com/issue/RIDER-8664
Yes, this got it, thanks! I can actually use Rider now - awesome.
For anyone else who wasn't sure where Show All Files was - it's under the Cog menu at the top of Solution Explorer.
@Ivan, what are the differences between excluding files in Inspection Settings and excluding files from the context menu?
@Mikeachamberlain "Inspection Settings" in Rider settings are part of Re# backend settings, and Exclude from index in context menu deals with frontend (Intellij IDEA) settings.
As posted above https://youtrack.jetbrains.com/issue/RIDER-8664
Why is my C:\Users directory being indexed anyways, if my solution is on a totally different path (C:\Repo)? Indexing files and folders in my users directories doesn't seem to be very good anyways?
Thanks in advance.
@Arthur Heck, Are you sure, that there are no imports in csproj leading to Users folder?
If you attach logs (Help-Show log in Files) to some issue in youtrack https://youtrack.jetbrains.com/issues/RIDER
Then we can tell more specifically about that.
Please follow up here with the logs.
i can see that there is a background task running that indexes what looks to be my entire hard drive. AFAIK there is no link to any file outside my solution folder. i'll just have it rescan for the index and upload the log right away, since this is easy to reproduce. getting a short-term feedback on this would be extremely helpful, i'm trying to set up rider as a company wide IDE, but this index looks to slow down the otherwise great performance - tremendously.
while having the index recreated, i had notepad++ run over all the .csproj-files in my solution looking for "C:", the results were some dlls that were underneath "C:\Windows" and so forth, thats all.
i also set up paths in settings/editor/inspection settings, that did nothing as far as i could see.
@Arthur, please follow up here with link to youtrack issue, thanks!
BTW There is no need to use notepad++.
Ctrl+Shift+F helps to find anything in the solution or project or folder.
And it is very handy to view/edit csproj in Rider itself - select project in SolutionExplorer and press F4 (Edit csproj action is also in the context menu).
https://youtrack.jetbrains.com/issue/RIDER-10570
thanks in advance, ivan!
@Arthur, It turned out that needed info in not logged to regular logs, we would need a different dump from you.
Switch Rider to Internal mode https://rider-support.jetbrains.com/hc/en-us/articles/207327910-How-to-run-JetBrains-Rider-in-Internal-Mode and run command from menu Tools -> Internal action (rider) -> Dump -> File Path Index
Please attach it to the same issue. Thanks!
sure can do.
that command is greyed out upon opening a solution.
Is it active after opening solution and indexing finished?
it is actually. i attached it to the bug.
Hi! I have same issue (high processor usage on reindexing of node_modules folder when I call npm i).
I latest Rider 2017.2.
I turned on "Show all files" in cog menu of Solution Explorer, but there is no menu item which called "Exclude from index".
How I can turn off indexing specific folder in latest Rider?
@Akhariov,
"Include/Exclude from index" was renamed into Include/Exclude from Solution Structure.
You may use Solution Structure view, which in Internal for now, more info here https://youtrack.jetbrains.com/issue/RIDER-8664#comment=27-2399808
I have this problem even after excluding the folder in Solution Structure.
This is driving me mad. When Rider decides to scan my assets folder (which I do NOT want to be scanned), it goes to 100% CPU usage, kills my battery and never actually finishes.
The folder is clearly excluded in the internal Solution Structure view yet Rider keeps trying to scan it.
I have the same problem with node_modules. Folder is excluded in "Solution Structure", but I still can see it is indexed. And it takes forever. I am unable to do anything when this happens, because indexing eats all the CPU. Today I have installed latest EAP, and it is no different from 2017.3.1.
Hello! As you can see in the image below, I can't prevent node_modules from being indexed anymore, which is a major pain, because it takes a long time and also because search also searches in node_modules which I don't want.
I think the behavior is new since I upgraded to Rider 2018.1.
Please advise
Actually the problem was also present in 2017.3.1, but not in 2017.2.1.
Looks like the option just disappeared.
"Interestingly", if I make the changes in 2017.2.1 ("exclude the folders from solution structure") and then open the solution from 2018.1, the changes are kept.
I did the following to solve this problem:
Hope this will help someone.
Thanks Valerii! Looks like it's working!! At least the folder becomes red :)
Actually the folder indeed becomes red but it's still indexed.
Jetbrains engineers, please fix this :(
@Yannick, Please try Rider 2018.2 and let us know if it helped.
After adding some 'huge' binary files used for tests I experience out of memory problems with 2018.2.3. I did add an exclude in the 'Inspection Settings'.
@Marcel, what exactly do you see?
Hi there, I tried both exclusion from the Inspection Settings and the solution Exclude folder but it simply does not seem to work. The exclude functionality from within the Explorer does work temporarily but immeditately reappears as you save any file on a Unity project. I have opened a ticket for this:
Still not working with Rider 2018.2.
Very annoying.