altsem / altsem/gitu

Gitu slow in large repos

Open
#374 26 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.9k
Forks
164
PR merge metrics
No merged PRs in 30d

Description

I mainly work in a large git repo (on the order of 1 million commits), and gitu takes ~11 seconds to start on my fast M3 Max MacBook Pro. Any time the main screen needs to be shown it takes about this long to re-render it.

This is likely because of all of the info gitu is fetching by default, fetching untracked files, stashes, recent commits, etc. However 11 seconds is still slower than fetching that info manually would take with git via the command line, so there's probably some additional inefficiency somewhere.

Some of this slowness is unavoidable in a large repo, but some of it can be mitigated through optimizations or configuration options. For example, having an option to not show untracked files could speed things up. For comparison, magit lets one control which sections are inserted on the status screen, and provides a verbose mode that shows how long each section took to insert. This lets one omit especially slow or less useful sections to get a more usable experience in a large repo.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by profiling startup and main-screen rendering in a repository with around one million commits, then compare the work with equivalent Git command-line operations. Done means measurable improvement for large repositories or a clearly specified configuration approach for omitting slow status sections.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.