Closed AArnott closed 2 years ago
After git gc
we're down to 738ms when EnableFileStatus = $false
and 5849ms when EnableFileStatus = $true
.
Still, 738ms is very slow for just looking up the branch name.
Could you temporarily move the module out of the OneDrive folder and into your ~\Documents\PowerShell\Modules
folder to see if that makes any difference?
I'm happy to try this out. But there is no Documents folder under my profile path. Literally if I try to navigate to C:\Users\andarno\Documents\PowerShell
it redirects to C:\Users\andarno\OneDrive\Documents\PowerShell
. Is there some other location I could try moving the module to? And could I then tell PowerShell to load it directly from there?
Gotcha. In that case, can you try moving the posh-git module folder to $PSHome\Modules
e.g. 'C:\Program Files\PowerShell\7\Modules\'
?
Just tried it. It doesn't seem to make any difference. Although now, no matter which location posh-git is in, the prompt takes only about 100ms to appear, which is perfectly fine. I don't know why yesterday it was taking 738ms.
Can we close this?
System Details
Issue Description
In very large git repos, posh-git perf is abysmal. Even when turning off file status. See here an example:
Turning off file status trims off about 3 seconds of 18, leaving 15 seconds. What is happening during those 15 seconds and how do I turn that off too?
I'd eventually like to use
$GitPromptSettings.RepositoriesInWhichToDisableFileStatus += 'c:\vs.r'
to fix perf for just this repo and use file status for all other repos, but after some analysis I found that even turning it off completely (as above) it doesn't solve the problem.