intellij从磁盘获取更改的速度非常慢

时间:2020-08-29 06:42:04

标签: intellij-idea

我只是签出了一个新分支,即使在5分钟后intellij中的文件系统仍然没有更新。其他所有内容也感觉很迟钝(单击文件,再单击intellij中的另一行)。我说的是3个新文件,变化不大。几周前还好。

  • 没有索引任何内容
  • 已将防病毒独占功能添加到文件夹中(用来在我每次打开以添加排除对象时询问我,好像忘记了,我不得不删除该设置以不再询问)

IntelliJ IDEA 2019.3 x64-Win 10 Pro 64位

我需要手动按“从磁盘重新加载”以立即获取更改。


我偶然发现这里有一件红色的东西在眨眼

enter image description here

点击并赢得竞争

enter image description here

java.lang.ClassCastException: class com.intellij.lang.javascript.psi.impl.JSFileImpl cannot be cast to class com.intellij.psi.xml.XmlFile (com.intellij.lang.javascript.psi.impl.JSFileImpl is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @47a826eb; com.intellij.psi.xml.XmlFile is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @4f2410ac)

我什至不使用android。

然后我去了插件,并选择了数百个项目。我取消了所有不需要的选择。

2 个答案:

答案 0 :(得分:0)

显然可能会有很多不同的事情

  1. 在这种情况下,第一件事就是“文件->使缓存无效/重新启动”

如果这不起作用

  1. 如果您有一个相当大的项目,则可能会超过Inotify Watches限制(仅在Linux系统上)。如果是这种情况,请遵循说明here

简而言之:

将以下行添加到/etc/sysctl.d/目录下的/etc/sysctl.conf文件或新的* .conf文件(例如idea.conf):

fs.inotify.max_user_watches = 524288

然后运行此命令以应用更改:

sudo sysctl -p --system

答案 1 :(得分:0)

enter image description here

我已在框架或编辑器选项卡激活时同步文件-未选中!这就是文件未同步的原因...

我在读这本https://stackoverflow.com/questions/29965896/how-can-i-stop-indexing-intellij-idea#:~:text=You%20can%20stop%20synchronizing%2Findexing,frame%20or%20editor%20tab%20activation%20时才发现。