What happened?
With hunk pager configured as LazyGit's pager, opening a repository with roughly 4,000 commits launches multiple Hunk processes for LazyGit's concurrent branch-log queries. Each process continuously uses approximately 100% of one CPU core and grows to gigabytes of resident memory.
The observed process tree was:
lazygit
├─ git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium <feature-ref> --
│ └─ hunk pager
├─ git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium <default-ref> --
│ └─ hunk pager
└─ git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium <default-ref> --
└─ hunk pager
After approximately 55 seconds, the three Hunk processes were still running at about 100% CPU each, with RSS values of approximately 2.6 GB, 7.8 GB, and 0.9 GB. macOS sample reported physical-footprint peaks up to 6.5 GB for an individual process.
The complete Git log output is only about 3 MB per branch (approximately 4,000 commits), measured independently with the same git log arguments and --no-pager.
No global Git pager points to Hunk, PAGER=less, and a small standalone diff piped through hunk pager exits normally. The behavior was noticed after updating Hunk to 0.21.0; the previously installed version is unknown.
This may be related to #247's description of hunk pager buffering complete Git log streams, although this reproduction uses a non-patch git log stream and shows extreme amplification from roughly 3 MB of input to gigabytes of memory.
Environment:
Hunk: 0.21.0 (Homebrew)
LazyGit: 0.63.1 (Homebrew, arm64)
Git: 2.55.0
OS: macOS 26.5.1 (25F80), Apple M4 Pro, arm64
Terminal: tmux, TERM=xterm-256color, COLORTERM=truecolor
Shell: zsh
Steps to reproduce
-
Configure Hunk as LazyGit's pager on macOS:
git:
pagers:
- colorArg: always
pager: hunk pager
-
Open LazyGit in a repository with several thousand commits.
-
Select/navigate branches so LazyGit renders branch history.
-
Inspect the hunk pager processes in btop, ps, or Activity Monitor.
Observed consistently during the captured reproduction. Removing the Hunk pager configuration avoids the problem.
Expected behavior
Non-diff git log output in LazyGit's captured-pager context should be passed through promptly with bounded CPU and memory usage. Concurrent LazyGit render jobs should terminate rather than leaving Hunk processing indefinitely.
Version
0.21.0
What happened?
With
hunk pagerconfigured as LazyGit's pager, opening a repository with roughly 4,000 commits launches multiple Hunk processes for LazyGit's concurrent branch-log queries. Each process continuously uses approximately 100% of one CPU core and grows to gigabytes of resident memory.The observed process tree was:
After approximately 55 seconds, the three Hunk processes were still running at about 100% CPU each, with RSS values of approximately 2.6 GB, 7.8 GB, and 0.9 GB. macOS
samplereported physical-footprint peaks up to 6.5 GB for an individual process.The complete Git log output is only about 3 MB per branch (approximately 4,000 commits), measured independently with the same
git logarguments and--no-pager.No global Git pager points to Hunk,
PAGER=less, and a small standalone diff piped throughhunk pagerexits normally. The behavior was noticed after updating Hunk to 0.21.0; the previously installed version is unknown.This may be related to #247's description of
hunk pagerbuffering complete Git log streams, although this reproduction uses a non-patchgit logstream and shows extreme amplification from roughly 3 MB of input to gigabytes of memory.Environment:
Steps to reproduce
Configure Hunk as LazyGit's pager on macOS:
Open LazyGit in a repository with several thousand commits.
Select/navigate branches so LazyGit renders branch history.
Inspect the
hunk pagerprocesses inbtop,ps, or Activity Monitor.Observed consistently during the captured reproduction. Removing the Hunk pager configuration avoids the problem.
Expected behavior
Non-diff
git logoutput in LazyGit's captured-pager context should be passed through promptly with bounded CPU and memory usage. Concurrent LazyGit render jobs should terminate rather than leaving Hunk processing indefinitely.Version
0.21.0