-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance for git prompts (on PowerShell) #4880
Comments
Currently doing some reading about this. I like the note that's here on romkatv gitstatus README's Why Fast. This does make a lot of sense and I might seek to replicate the scenario used in the benchmarks. I also understand the idea behind the PRs you listed from posh-git PR 924 using Get-GitConciseStatusFromCache (which is defined here). There is a oh-my-posh does have a cache declared within the JSON file at Here is the Will dig further into the codebase to see what can be done and maybe put out a PR. |
@brian6932 what would be really cool is if there is a Go package available with the logic :) |
There's https://github.com/go-git/go-git I guess, you'd have to implement the caching on top of it, or just use the code from https://github.com/go-git/go-git/blob/master/status.go and work from there, as it'd reduce dependencies. |
Go git is terribly slow, tried it before. I don't mind adding support for existing cache tools, I'm not in favor of adding logic that aims to do what git itself should improve (faster status). |
I found starship (which uses |
@brian6932 check, but as a maintainer, I need to be careful how far this can get pushed. And that's an implementation where I want to be in the lead so I can also keep offering support. It's not easy or straightforward or git would've fixed it already. |
Code of Conduct
What would you like to see changed/added?
posh-git
's not really maintained, there has been an open PR to improve thegit status
performance for quite some time (dahlbyk/posh-git#924). It's currently extremely sluggish (yes even with"ignore_submodules":{"*":"none"}
). Realistically to have consistent performance across all supported shells, it would be nice foroh-my-posh
to have it's owngit status
handling, either withgit-status-cache
or with it's own cache. Since that's a bit more involved, a quick solution for now would be to use https://github.com/zhengweidi/git-status-cache-posh-client/tree/master with https://github.com/zhengweidi/git-status-cache/tree/master, or something like gitstatusd https://github.com/romkatv/gitstatus.The text was updated successfully, but these errors were encountered: