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:

#com.intellij.util.indexing.FileBasedIndexImpl:trace
#com.intellij.openapi.util.io.FileSystemUtil:trace

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).

0
评论操作 固定链接

So when I look around the project it has a number of folders excluded like:

modules.xml

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <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" />
    </modules>
  </component>
</project>

 

workspace.iml

<?xml version="1.0" encoding="UTF-8"?>
<module external.system.id="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/api_pb2.py) = [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

0

请先登录再写评论。