rowanj / gitx

Fork of Pieter's nice git GUI for OS X. Includes branch/tag sidebar and various fixes. Current development focus is on removing legacy git command line usage in favour of libgit2 and objective-git.
http://rowanj.github.com/gitx
Other
2.14k stars 204 forks source link

Auto-Refresh taking ages #222

Closed filippo-basso closed 11 years ago

filippo-basso commented 11 years ago

for big projects, better to remove auto-refresh and put a button, otherwise it take ages and it's really annoying...

thank you for the nice project!!!

rjmunro commented 11 years ago

Sometimes if I do an operation like git rebase in a command line, it looks like gitx tries to refresh repeatedly during the operation, slowing down my whole computer. It would be better if it only refreshed after 1 or 2 seconds of no activity, rather than straight away.

filippo-basso commented 11 years ago

...and imagine what happens if you are compiling a long project (10minutes) and for some reason cannot put all the intermediate temporary files in the .gitignore ... it takes 20minutes and GitX is utilizing 99% of one of my 2 processors!!!

Uncommon commented 11 years ago

I often have to quit GitX if I'm doing a rebase on the command line, because contention over the lock file keeps interrupting the rebase.

Also, I have a repository with a large number of files, and working in the stage view tends to involve lots of beachballs.

filippo-basso commented 11 years ago

I remember an old, simple button "REFRESH", maybe can be also an option in Preferences, but for me I'll never want auto-refresh for anything else than a super-simple project.

Please put back the REFRESH button...

P.S. also the number of the issue, #222 , it's not a coincidence...! ;-)

rowanj commented 11 years ago

The refresh should be very fast; please add some details (number of commits, branches, remotes, tags), or a link to the repository for testing.

If you want a button, press ⌘-R; or it's right there in the bottom toolbar: screen shot 2013-07-14 at 11 09 55 pm

filippo-basso commented 11 years ago

Thank you rowanj, the point is: can we completely disable auto-refresh? Refresh should (in many projects) be only manual, in this view you're showing, but expecially in the Stage view. Imagine a project with thousands of files, where I want to commit only 10-20 but I don't want to keep the thousands in a .gitignore, because I need to be conscious of what is changed...

Like, a compiler is acting on the git directory, creating a lot of intermediate files, metafiles, project files, but I want to see in the Stage view, to understand that everything goes okay). Of course, object files or files that are not important can be hidden from this view (should be, via a proper .gitignore), but in several projects where are at least 4-5 people working and thousands of files, Stage cannot be automatic.

I propose a checkbox in the settings, that enable the automatic behavior, sometimes useful, but in this way when the project assume a big dimension, you still can handle it. I was tempted to switch to SourceTree just for this very annoying issue.....

thank you anyway, the program is anyway good, and what I'm doing now (not to have the too much invasive SourceTree) is just to turn off GitX during compilation time... if I forget open, it eats 99% of one processor! byebye

tiennou commented 11 years ago

Under Preferences, General > "Watch for changes in repository" ?

filippo-basso commented 11 years ago

Thanx!!! I don't know why, I was sure it was there and couldn't find, but you're right, this is the flag I searched for...

Uncommon commented 11 years ago

I took an Activity Monitor sample while GitX was hung up refreshing the index, and it was mostly in libgit2's git_status_foreach, burning 80-100% CPU for 5-10 seconds.

filippo-basso commented 11 years ago

@Uncommon well, if has to refresh the index, it is almost normal, the good thing, as @tiennou highlighted, is that this time can be triggered manually, instead of automatically every change in the directory.

For me tiennou solved the point. Thanx!