Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
File viewer refreshes too often #517
I'm noticing a quite annoying behaviour in file-viewer. Basically, file lsit is refreshed a lot of times, probably even without need. If I open a file with ctrl-e, file list is refreshed and it is (at least on my system) a slow operation,as the whole window is redrawn. When the file is closed, another refresh is performed and so on.
Maybe git-cola is monitoring too many flags of inotify or something like that?
I don't know if this a general issue or only on my system; with some hint I could also dig into this on my own.
git-cola fetched from github (bb439b3)
built using gentoo system
I suspect that this behavior has always been present in git-cola's filesystem monitoring code, but you are probably seeing it now due to some (still unreleased) changes I made to the implementation. Prior versions of git-cola implemented filesystem monitoring on Linux using pyinotify. With my changes, it no longer uses pyinotify but instead invokes the inotify functions from libc directly via ctypes. As a result, filesystem monitoring now enabled by default on Linux, when previously it would only be enabled if pyinotify was installed.
What editor do you use? Does it create a temporary file alongside your source file when you edit it (à la vim's
In the interim, you also set
referenced this issue
Nov 2, 2015
yep, right on the spot :) I'm using vim/qvim that make use of .swp files. I'll follow your advice about cola.inotify. Ignoring the same files ignored by git could be a good idea, imho. Or otherwise allow the user to specify a cola-specific blacklist, maybe defaulting to gitignore.