Skip to content
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

Tig endlessly loads git log (poor performance?) #905

Closed
midenok opened this issue Mar 30, 2019 · 4 comments
Closed

Tig endlessly loads git log (poor performance?) #905

midenok opened this issue Mar 30, 2019 · 4 comments

Comments

@midenok
Copy link

midenok commented Mar 30, 2019

image

The workaround is to specify -n for git log, but this is not good solution.

The better solution would be to do lazyload on request or do some limited forward preload. If it is impossible to solve this poor performance problem.

I don't know why tig log is much slower than git log, but git log goes almost instantly to the log bottom while tig log does some CPU-intensive computation:

git log jumped to year 2000 in a matter of several seconds;
tig log now loads 320 seconds and still at year 2011.

Tested on https://github.com/MariaDB/server

@typebrook
Copy link
Contributor

typebrook commented Apr 3, 2019

Lazyload feature is a good idea, but now tig can still use 'z' to do :stop-loading.
Or you can specify revision like tig commit1..commit2 or tig --after=2015

@midenok
Copy link
Author

midenok commented Apr 3, 2019

Yes, that's all requires manual interaction so that's not good.

@koutcher
Copy link
Collaborator

koutcher commented Jun 1, 2019

This might give you a hint:

$ time git log >/dev/null

real 0m7.475s
user 0m5.695s
sys 0m0.446s

$ time git log --cc --stat >/dev/null
^C

real 47m32.540s
user 34m37.393s
sys 10m40.983s

The second one is the actual command used by tig. If you're happy with the level of detail of the simple git log command, git log | tig is a good alternative.

@midenok
Copy link
Author

midenok commented May 30, 2022

@koutcher So what about configuring tig log to work like git log? I don't think pipe syntax is the solution you should respectfully offer.

Besides, you ignored the fact tig log loads CPU needlessly. When someone supplies --cc --stat he knows what he is doing. tig does that by default. That's at least non-user-friendly, at most an incorrect behavior. So, please consider reopening and correcting the ticket: by default it should not be CPU-intensive. Either it should work like git log by default or do a chunked lazyload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants