-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
massive performance regression with large git trees #310
Comments
True. I don't test large git trees, unfortunately. Will try to investigate One optimization was added to reduce the log data read from git by using a Else could you try to disable the revision graph if it is not already. 2.0
|
I do tend to have a lot of remotes and a lot of branches, which I'm sure doesn't help. But from a quite test, it seem to take ~5s to see anything in main view (after 'Unstaged Commits') both with and without graph. And in either case it will sit there (if not interrupted) for several minutes at least loading older commits. Not sure if there is some way I can configure it to limit the amount of history that it tries to load? At any rate, other than taking a lot of disk space and network bandwidth for a fresh kernel tree clone, it would be a good thing to keep around for a good real-world stress test. So far I've not found any other git tree that I have this problem with. But the kernel tree is one I spend a lot of time with ;-) If it is somehow due to new features in tig 2.0, it would be pretty nice if there was a way to configure (per git tree) to somehow fall back to 1.x behaviour. |
Oh, another thing to try is to:
in your |
And yes, on my work laptop I used to have the kernel tree lying around for testing. I will make a new clone and test this myself. |
seems to help a bit.. I guess I should build tig1 so I have a way to compare back to back? I don't suppose you happen to have a .tigrc that is equiv to tig v1. behaviour? Fwiw, what I am using at the moment:
|
No, there's only a file for reversing the bindings to v1. To run v1 when v2 is installed use:
|
So I got around to testing this. Assuming:
* (60+ seconds to load less than 5% of commits) See below for the settings added in Observations
Run 1 settings: No graph, no changes
Run 2 settings: No graph, with show-changes
Run 3 settings: With graph and show-changes
|
ahh, thanks for following up on this.. sorry, I'd been kinda busy and hadn't gotten to building tig 1.x yet. I don't suppose there is any way to see other-heads without graph enabled? I guess looking at the other heads may be expensive (especially when there are a large number of local and fetched remote branches), but it is nice to be able to see things like 'local branch foo is at a particular commit, while remote/foo is several commits behind', and that sort of thing which normally comes along with the graph. I guess I'll disable graph for now for my kernel trees.. although some sort of lightweight graph w/ algo more similar to tig 1.x might be kinda useful.. one note: I usually use 'z' to stop loading commits once I have something on screen.. although maybe some sort of optional time-based threshold to stop loading could be useful? |
I am feeling the pain on this issue as well. Tig 1.x used to show the history immediatly on a Linux kernel tree and work in the background (like Rob I usually pressed 'z' immediately to stop loading commits). With Tig 2.x I have to wait at least 5 seconds before something useful appears on the screen. I am not really aware of the underlying changes that may have caused this, or the reasons behind them, but this certainly made the hugely useful tig less usable for Linux developers. |
The reason is that graph rendering now automatically enables the So this problem can be worked around by disabling graph rendering and you can further skip startup costs by disabling display of dirty tree state in the main view. This can be done by adding the following lines to
How to resolve this I am not sure. On one hand I'd prefer that tig does "the right thing" by default, which is to automatically assume As I mentioned somewhere else, if I remember correctly gitk loads an initial page of commits using the default (fast) order and then restarts |
Oh yes, thanks. Now it's super-fast again. Graph rendering is nice, but for our use-case speed is probably more important. Is there an option that would make tig not specify |
This permits to avoid any initial pause during startup due to git-log buffering commits for reordering. References #310
+1 |
Please see https://github.com/jonas/tig/blob/master/contrib/large-repo.tigrc for a list of options to speed up Tig in large repos. |
@jonas works great for loading large repo, works for me. Still having problems with the status window not reloading changes with
Doing a |
@financecoding Maybe this should go into a new issue. However, |
Refreshing is broken though ... |
Not sure if you ever test tig with linux kernel git tree? You should. Somehow since tig 2.0 performance has massively regressed, to the point where it is barely usable. (fwiw, I have 2.0.2 curently)
It doesn't seem to be a problem on smaller git trees.
The text was updated successfully, but these errors were encountered: