lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Reflog very slow on large git repositories

Open juru1234 opened this issue 1 year ago • 6 comments

Describe the bug When using large repositories, changes appear slow in "Commits - Reflog"

To Reproduce Steps to reproduce the behavior:

  1. Clone the linux kernel
  2. Reword a commit
  3. Wait until the change appears in "Commits - Reflog"

Expected behavior Changes should appear fast

Version info: latest master

Additional context Add any other context about the problem here.

juru1234 avatar Apr 19 '23 14:04 juru1234

This is a general issue we are aware of that unfortunately has no easy fix. You could try checking out this to see if it helps in any way.

mark2185 avatar Apr 19 '23 14:04 mark2185

You could try checking out https://github.com/jesseduffield/lazygit/pull/2533 to see if it helps in any way.

I would be very surprised if it did, I think this is very unrelated.

stk-ableton avatar Apr 19 '23 15:04 stk-ableton

Ah wait, I was actually misreading the question. It's not really about the Reflogs panel in particular, is it? Just about the normal Commits window? In this case, #2533 might actually help a bit, but I doubt it helps very much. #2533 is particularly about the case where you load more than the initial 300 commits, which is something that I wouldn't recommend to do in the linux kernel repo, regardless of with or without #2533...

stefanhaller avatar Apr 19 '23 15:04 stefanhaller

So it's not just rewording a commit that is slow, it's also the time it takes for a newly created commit to appear in the list, or for the list to appear at all at startup.

For the linux kernel, all this can be dramatically improved by adding

git:
  log:
    order: "default"

to your lazygit config file.

@julianruess Can you please try this?

stefanhaller avatar Apr 20 '23 07:04 stefanhaller

Sorry for the confusion. Yes, I mean the time until a commit appears in the commit list. Tried this setting, doen't seem to improve it.

juru1234 avatar Apr 20 '23 07:04 juru1234

Tried this setting, doen't seem to improve it.

That's strange. Did you quit and restart lazygit? For me it makes a big difference.

stefanhaller avatar Apr 20 '23 07:04 stefanhaller