jesseduffield / jesseduffield/lazygit

Degraded performance when running lazygit with TERM=vte-direct

Open
#2,179 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
When running `lazygit` from the `fish` shell, lazygit takes longer than usual to load, display the commit history and operations are sluggish as well. The problem doesn't manifest when I run lazygit from bash.

**To Reproduce**
Steps to reproduce the behavior:

1. open a terminal and set your `TERM=vte-direct`
2. Go to a clone git repository
3. run `lazygit`
4. `lazygit` starts but it takes a few seconds for the interface to appears and few more seconds for the commit history to appear.
5. Other operations are slow such as resizing the terminal

**Expected behavior**
lazygit should be fast as usual

**Version info:**
lazygit: version 0.35
git version 2.30.2
debian 11 (up to date)

**Additional notes**
1 - I compiled the `master` branch and installed the binary, but the problem remains.
2 - Maybe, it's conflict between `TERM` and `COLORTERM` (COLORTERM=truecolor).

Using `--debug` and `--logs`, there's no obvious error messages, however, it takes a good 5 seconds to load the local repository (about 200 commits in it). If I click on a commit, it takes about 15 seconds to display the patch.

**debugs from fish**
```
Sep 21 18:36:58 |INFO| language: en
Sep 21 18:36:58 |DEBU| RunCommand command="git --version"
Sep 21 18:36:58 |DEBU| RunCommand command="git rev-parse --git-dir"
Sep 21 18:36:58 |DEBU| RunCommand command="git rev-parse --is-bare-repository"
Sep 21 18:37:03 |INFO| starting main loop
Sep 21 18:37:03 |INFO| Binary is not built with the buildBinary flag so we won't check for an update
Sep 21 18:37:03 |DEBU| RunCommand command="git rev-parse --is-bare-repository"
Sep 21 18:37:03 |INFO| refreshing all scopes in async mode
Sep 21 18:37:03 |DEBU| RunCommand command="git branch -r"
Sep 21 18:37:03 |DEBU| RunCommand command="git stash list --pretty='%gs'"
Sep 21 18:37:03 |DEBU| RunCommand command="git tag --list --sort=-creatordate"
Sep 21 18:37:03 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=\"%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)\" refs/heads"
Sep 21 18:37:03 |DEBU| RunCommand command="git merge-base \"HEAD\" \"HEAD\"@{u}"
Sep 21 18:37:03 |DEBU| Error getting git config value for key: status.showUntrackedFiles. Error: the key is not found for [git config --get --null status.showUntrackedFiles]
Sep 21 18:37:03 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Sep 21 18:37:03 |DEBU| RunCommand command="git symbolic-ref --short HEAD"
Sep 21 18:37:03 |DEBU| RunCommand command="git merge-base \"HEAD\" \"master\""
Sep 21 18:37:03 |ERRO| fatal: Not a valid object name master

Sep 21 18:37:03 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=\"%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)\" refs/heads"
Sep 21 18:37:13 |DEBU| using cache for key status.showUntrackedFiles
Sep 21 18:37:13 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
```

**debugs from bash**
```
Sep 21 18:40:35 |DEBU| RunCommand debug=true version="0.35" buildDate="2022-07-20T09:27:56Z" command="git merge-base \"HEAD\" \"HEAD\"@{u}" commit="367b0d331836c90c015bf0c45f88612f3d94d08a"
Sep 21 18:40:35 |DEBU| RunCommand command="git tag --list --sort=-creatordate"
Sep 21 18:40:35 |DEBU| RunCommand command="git branch -r"
Sep 21 18:40:35 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=\"%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)\" refs/heads"
Sep 21 18:40:35 |DEBU| Error getting git config value for key: status.showUntrackedFiles. Error: the key is not found for [git config --get --null status.showUntrackedFiles]
Sep 21 18:40:35 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Sep 21 18:40:35 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=\"%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)\" refs/heads"
Sep 21 18:40:35 |DEBU| RunCommand command="git symbolic-ref --short HEAD"
Sep 21 18:40:35 |DEBU| RunCommand command="git merge-base \"HEAD\" \"master\""
Sep 21 18:40:35 |ERRO| fatal: Not a valid object name master

Sep 21 18:40:45 |DEBU| using cache for key status.showUntrackedFiles
Sep 21 18:40:45 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.