Constant "Scanning Files to to index..." ; IDE Unusable
已回答
I'm using Intellij 2022.2 and it's constantly scanning files to index in a large monorepo where there is 50k + files. It is a mix of Python, Go, C++, and some javascript.
The plugins I have enabled are
- bazel
- File Watchers
- Go
- Python
- Terraform and HCL
- Kubernetes
- Makefile Language
- Requirements
- Disabled Shared Index
I've tried doing git gc( where there is a bunch of files) and doing a bazel clean (it removes a bunch of files). I turned on profile indexing but I'm not sure where to find this profiling output or what to do with it.
Nothing seems to get scanning over the scanning files to index step.
请先登录再写评论。
Add the following in Help | Diagnostic Tools | Debug Log Settings:
Inspect the logs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085).
See if IDE indexes any files that it shouldn't. Exclude these folders from the project (bazel plug-in may add unnecessary directories to the indexed roots, such as output folders).
If you can't find the problem, report a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA with the debug logs attached (Help | Collect Logs and Diagnostic Data).
So when I look around the project it has a number of folders excluded like:
modules.xml
workspace.iml
Then in the logs I see stuff like this
Is there an issue where excluded folders get some kind of scanning even tho they are excluded?
Serge Baranov for viz
See https://youtrack.jetbrains.com/issue/IDEA-73309/When-a-folder-is-excluded-from-the-project-is-still-watched-with-inotify. You can try the patch for fsnotifier mentioned in the comments.
What worked for me was enable Wait for shared indexes and set Public Shared Indexes to Download automatically for both JDKs and Maven Libraries