5

Using Emacs on Windows, I experiences issues due to background invocations of git.exe. The same issues might apply on Linux, though the more light-weight process calling might make them unnoticable.

Symptoms

  • Occassionally, Windows will report that "Git has crashed", regardless of active Desktop window.
  • In the Task Manager, one to two git.exe processes appear every few seconds and vanish again.
  • In Emacs, random micro-stutters occur.

Diagnosis Attempts

  • Using “Process Explorer” (procexp.exe), it can be found that the git.exe processes are subprocesses of Emacs.
  • They occur whenever a file inside a git-versioned directory is opened. More such directories → more stuttering.
  • Doing M-x trace-function RET call-process RET with four files opened across two git repositories shows upwards of 30 git invocations per cycle. A high number of synchronous calls definitely explains stuttering.
kdb
  • 1,561
  • 12
  • 21

1 Answers1

5

Solution

The problems turned out to be caused by the customization variable auto-revert-check-vc-info.

If this setting is active, the version control software – git in my case – will be invoked every auto-revert-interval seconds (default 5) for each repository, causing the described behavior.

The only solutions I found were to increase the interval (counter-productive) and to disable auto-revert-check-vc-info (acceptable for me).

kdb
  • 1,561
  • 12
  • 21