-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
posh-git is still too slow... #78
Comments
If you're in a large repo, you probably want to set:
|
Or to disable it completely, just remove the posh-git line from your |
You can also selectively disable file status only for your slow repositories: $GitPromptSettings.RepositoriesInWhichToDisableFileStatus += 'C:\Path\To\Project' |
Reviving this thread as I'm getting bitten by this now. I'd like to keep using file status and I'm wondering whether a simpler solution than async is to use filesystem notifications or just limiting the number of file status requests within a specific period of time (caching)? I'm curious to know whether anyone has thought more about this and potential solutions? Would there be any potential benefit to testing out a couple of these options, or has the community moved on from this tool? |
There have been a few attempts at this... #52 (cache), #104 (async write to console buffer), #145 (https://github.com/fieryorc/gitprompt, a daemon to do the status monitoring). Of the three, I think the last will yield the best user experience - try @fieryorc's fork: https://github.com/fieryorc/posh-git? I regret that I haven't had time to try it myself. |
I'm guessing that this still has not been implemented? |
You guess correctly. However, #208 just dropped and it's looking very promising! |
removing this line: |
the pipeline is slow. Any areas that can be converted to use standard loops and .NET classes would significantly improve performance. |
@edclement excellent workaround! That increased the performance for me from unacceptable to no problem at all. |
posh-git is still slow on tab completion! |
Adding |
@edclement - not sure if your workaround is even valid. if StashStatus is disabled, that line won't execute. |
@ghostsquad - removing that line from the 0.4.0 release (the latest tagged version) definitely fixed the issue for me. That was the only thing I changed.
I don't see why that command wouldn't execute... |
oh oh, sorry, we were looking at different versions. I'm running straight from the master branch. |
@edclement 👍 worked for me, this makes it good enough to work with for me too |
What IS slow is having Posh in your profile - it adds about 2s to the already 2s startup of PowerShell 7 so it's really noticeable.
Is there something we can do? And how can we update? |
This issue was specifically about performance of the actual prompt status every time you hit enter, but I agree the module should be able to load faster. If you wanted to take a stab at optimizing it, I'd mimic how we figured out where the Lines 245 to 247 in 5a87e8a
|
I was optimizing the load time of my profile and surprisingly |
Mine was initially true, but setting it once to false and back to true again just fixed my slowness problem. |
@Ramin2c Thanks so much for this advice. Loading posh-git from my profile took almost 6 seconds. Changing the FileStatus parameter to false and back to true reduced the loading time to under 1 second. No idea why, but so much better 😃 |
Don't worry, no one knows why such so-called fix works, but glad I could help. |
I'm trying out posh-git, but it's still too slow. How do I uninstall it?
The text was updated successfully, but these errors were encountered: