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

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 (

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 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:


<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
      <module fileurl="file://$PROJECT_DIR$/.blaze/modules/.project-data-dir.iml" filepath="$PROJECT_DIR$/.blaze/modules/.project-data-dir.iml" />
      <module fileurl="file://$PROJECT_DIR$/.blaze/modules/.workspace.iml" filepath="$PROJECT_DIR$/.blaze/modules/.workspace.iml" />



<?xml version="1.0" encoding="UTF-8"?>
<module"Blaze" type="JAVA_MODULE" version="4">
  <component name="Go" enabled="true" />
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$/../../..">
      <sourceFolder url="file://$MODULE_DIR$/../../.." isTestSource="false" />
      <excludeFolder url="file://$MODULE_DIR$/../../../bazel-bin" />
      <excludeFolder url="file://$MODULE_DIR$/../../../bazel-genfiles" />
      <excludeFolder url="file://$MODULE_DIR$/../../../bazel-out" />
    <excludeFolder url="file://$MODULE_DIR$/../../../bazel-testlogs" />


Then in the logs I see stuff like this 

2022-08-05 10:12:11,437 [  58784]  FINER - #c.i.o.u.i.FileSystemUtil - getAttributes([...]/bazel-out/k8-fastbuild/bin[...]/internal_pip_dependency_protobuf_3_7/pypi__protobuf/google/protobuf/ = [type:null l length:0 modified:0 case sensitive: UNKNOWN] in 10 mks


Is there an issue where excluded folders get some kind of scanning even tho they are excluded?


Serge Baranov for viz