07mm8
07mm8

Reputation: 3298

intellij very slow getting changes from disk

I just checkout a new branch and even after 5 minute file system in intellij still didn't updated. Everything else also feels sluggish (click on files, click on a different line in intellij). I'm talking about 3 new files, not a big change. A few weeks ago was fine.

IntelliJ IDEA 2019.3 x64 - Win 10 pro 64bit

I need to manuallly press "reload from disk" to get my changes now.


By chance I noticed a red thing blicking here

enter image description here

clicked on that and opeend

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)

I don't even use android..

Then I went to plugins and had hundreds of items selected. I unselected all that I don't need.

Upvotes: 1

Views: 3424

Answers (2)

07mm8
07mm8

Reputation: 3298

Settings -> Appearance & Behavior -> System Settings

enter image description here

I had synchronize files on frame or editor tab activation - unchecked! that was the reason files didn't sync...

I figured out when I was reading this https://stackoverflow.com/questions/29965896/how-can-i-stop-indexing-intellij-idea#:~:text=You%20can%20stop%20synchronizing%2Findexing,frame%20or%20editor%20tab%20activation%20.

Upvotes: 0

fan
fan

Reputation: 2364

Obviously there could be a lot of different things

  1. In any such situation the first thing to do is "File->Invalidate Cache / Restart"

If this doesn't work

  1. If you have a reasonably large project, you might exceed the Inotify Watches Limit (only on Linux systems). If this is the case follow the instruction here.

In short:

Add the following line to either /etc/sysctl.conf file or a new *.conf file (e.g. idea.conf) under /etc/sysctl.d/ directory:

fs.inotify.max_user_watches = 524288

Then run this command to apply the change:

sudo sysctl -p --system

Upvotes: 1

Related Questions