You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GitHub Desktop runs long running update-index #12191
Breaking this out of a comment I left on an older issue.
I'm trying to get to the bottom of why GitHub Desktop 2.7.x feels so much slower than older versions. There are several issues where I have observed poor performance or long delays that I am not sure are related, so to keep this focused I will point out one I found evidence for:
I have a project with a pre-commit hook defined that runs tests. The project is small so this should be fast to run, no more than a few seconds (easy to verify when using the git CLI.)
I just committed via the app (2.7.2-linux1) and it took over 1 minute for the commit to go through. I looked at the logs and saw this:
Why is GitHub Desktop doing this and why does it take so long? This is a small side-project of mine, so it is not a problem with repository size.
My expected behavior would have been for the app to do as I tell it to: execute a commit, including any hooks defined, not run a 1 minute update-index op.
Is this expected behavior, and what can be done to speed this up?
So subsequent runs of update-index are much faster (4s vs 62s), but this still adds considerable overhead and app latency. I have used git for close to 20 years now and have never before had to git update-index. It looks like this is used to temper with the file cache:
Modifies the index or directory cache. Each file mentioned is updated into the index and any unmerged or needs updating state is cleared.
Does the app use this to sync its UI to the local git index state? Is there a way to speed this up or run this less frequently?
Activity
mttkay commentedon May 11, 2021
I now realize it seems to be doing this for every commit. I committed again, and the logs now say:
So subsequent runs of
update-indexare much faster (4s vs 62s), but this still adds considerable overhead and app latency. I have used git for close to 20 years now and have never before had togit update-index. It looks like this is used to temper with the file cache:Does the app use this to sync its UI to the local git index state? Is there a way to speed this up or run this less frequently?
steveward commentedon Oct 7, 2024
Adding to #10625 and closing out.