At work we are working mostly in Scala and most of us are using IntelliJ IDEA for coding. The choice of the operating system is up to the developer. As I am quite convenient with Windows (and use MS Office quite often), I am a happy Windows 8.1 user (btw: who the hell needs a start button when you have the windows key!? Anyways … different story).
After a while when I started a Scalding project, IntelliJ became very slow and often turned to be non responsive for some seconds about once per minute. So over all it was a very inconvenient and unproductive situation.
Of course I followed all kind of IntelliJ tuning tips, tuned vmoptions, etc. Yet the cumpulsory breaks remained. In the end I turned off the Scala compile server which eliminated most of the breaks – yet I also lost a lot of convenience of the IDE like marked compile errors immediately after typing etc. My machine was already equipped with an SSD, so upgrading to SSD wouldn’t lead to any improvement.
Solution 1: Tortoise git status cache
So I decided to track the problems one step further. Windows’ Resource Manager became a permanent companion. First I only monitored CPU. This quickly showed me that TGitCache repeatedly consumed 100% CPU. A quick search led to Tortoisegit Issue 980. Disabling the icon overlays quickly eliminated this problem
Settings > Icon Overlays > Status Cache=None!
Solution 2: File History / Dateiversionsverlauf
I got less breaks now – but still got them. Monitoring RAM didn’t add any insights – I always had more RAM free than was required by any program. So I moved on to monitoring IO. IO Activity sorted by bytes total then showed me that when I experienced an IntelliJ hang, a certain Windows process had quite some IO activity. A quick search revealed that it was the drive file history process (German: Dateiversionsverlauf). I then remembered that I turned this feature on some time ago as I usually like the on the fly backups and shadow copies. Unfortunately a lot of files seem to get touched during a Scala/SBT/Play/Scalding project. So this might lead windows to permanantly shadow copying a large number of files.
Turning off file history suddenly made IntelliJ blazingly fast again. Hooray! >The quickest fix is to diable the feature completely. Yet I don’t want to miss the feature completely. The only way to configure file history on a per directory level seems to be editing the registry directly as described in an article in MSDN.
But at least my machine is now really nice and usable again!
If you’re geeting into the same trouble:
Disable Windows’ file history first and see if this solves your issue. Maybe also disable TortoiseGit’s status cache.
But the most important lesson: Learn how to debug your problems not only in the programming language you are using but also the tools your operating system provide. They can be live-savers.