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
I use delta version 18.0.2 both on my work laptop (Macbook, homebrew version) and on my workstation at work (a modified Debian 6.12.32 maintained by Google for its engineers). On the laptop, time delta shows 68.ms but on my workstation:
The main way to use delta is to configure it as the pager for git: see https://github.com/dandavison/delta#get-started. You can also use delta to diff two files: `delta file_A file_B`.
________________________________________________________
Executed in 2.38 secs fish external
usr time 0.15 secs 1.07 millis 0.15 secs
sys time 2.24 secs 0.21 millis 2.24 secs
Both laptop and workstation have the same dotrc files, so I'd rule this out. In both cases, I try in a /tmp/test empty directory so that it's not due to some slow mounted filesystem.
Is there sometihng special that delta does at startup, like searching for something, that could explain such a delay (because my workstation would have this something slower to find/access)? Any suggestion on how to investigate?
Is it slow with --no-gitconfig? E.g. what do you get for this?
$ time delta --no-gitconfig
The main way to use delta is to configure it as the pager for git: see https://github.com/dandavison/delta#get-started. You can also use delta to diff two files: `delta file_A file_B`.
delta --no-gitconfig 0.01s user 0.03s system 104% cpu 0.035 total
That's the right direction. With --no-gitconfig it's fast. I dug a bit, and there are two aspects:
in a directory our specially mounted filesystem, where working directories are usually deep and are not git versioned, it seems searching the .gitconfig upward is adding 600ms.
I bissected my .gitconfig until I could find that any of the two commented lines adds 2s of slowliness.
[delta]navigate = true # use n and N to move between diff sectionsdark = true
#side-by-side = truehyperlinks = false
#line-numbers = trueline-numbers-left-format = "{nm:>3}┊"line-numbers-right-format = "{np:>3}│"syntax-theme = Solarized (dark)
I wondered if those options require querying the terminal for some information, and maybe Kitty was special. But Xterm also exhibits the issue.
So to summarize, the situation is:
╰─ time delta --no-gitconfig
________________________________________________________
Executed in 15.23 millis fish external
usr time 2.56 millis 1.16 millis 1.41 millis
sys time 20.89 millis 0.23 millis 20.66 millis
╰─ time delta --no-gitconfig -s
________________________________________________________
Executed in 2.04 secs fish external
usr time 0.12 secs 0.00 millis 0.12 secs
sys time 1.92 secs 1.54 millis 1.92 secs
Repository owner locked and limited conversation to collaborators on Sep 4, 2025
Activity
dandavison commentedon Sep 3, 2025
Can you try setting either
dark=trueorlight=true? Terminal background color autodetection is the most likely culprit.Xadeck commentedon Sep 3, 2025
I should have mentioned that I tried that (reading other bugs related to slowness) with
time delta --dark. Still very slow.dandavison commentedon Sep 3, 2025
Is it slow with
--no-gitconfig? E.g. what do you get for this?Xadeck commentedon Sep 4, 2025
That's the right direction. With
--no-gitconfigit's fast. I dug a bit, and there are two aspects:in a directory our specially mounted filesystem, where working directories are usually deep and are not git versioned, it seems searching the
.gitconfigupward is adding 600ms.I bissected my
.gitconfiguntil I could find that any of the two commented lines adds 2s of slowliness.I wondered if those options require querying the terminal for some information, and maybe Kitty was special. But Xterm also exhibits the issue.
So to summarize, the situation is: