I'm using iTerm2 with oh-my-zsh and have powerlevel10k set as my theme.
When I cd into a directory like ~/Project/xxx, where xxx is a Git-managed project with a total file size of over 35GB, I notice a significant delay in rendering the Git branch name color in the prompt.
To illustrate the issue: after entering this directory, if I press the Enter key 5 times quickly, the expected output should look like:
~/Project/xxx some_branch_name 1
~/Project/xxx some_branch_name 2
~/Project/xxx some_branch_name 3
~/Project/xxx some_branch_name 4
~/Project/xxx some_branch_name 5
Here:
~/Project/xxx is rendered in blue
some_branch_name is rendered in orange
However, in reality:
- The
some_branch_name text for lines 1 through 4 appears without the orange color — just plain text.
- Even in line 5, the branch name eventually appears in orange, but there’s a noticeable delay compared to the directory path part, which is rendered instantly.
It seems that in large repositories, the Git status detection (or color rendering) is not keeping up with the shell prompt refresh rate.
Unfortunately, since this is happening on a company-issued machine, I’m unable to attach screenshots or video.
Let me know if there’s any debugging output or config I can provide to help trace the issue. Thank you!