Posh-git: $GitPromptSettings.EnableStashStatus = $true results in slow prompt

Created on 6 Mar 2017  Â·  5Comments  Â·  Source: dahlbyk/posh-git

System Details

  • posh-git version/path: 1.0.0.0 pre00 ~\GitHub\dahlbyk\Posh-Git\src
  • PowerShell version: 5.1.14393.693
  • git version 2.12.0.windows.1
  • OS: Microsoft Windows NT 10.0.14393.0

Issue Description

Maybe this is just the nature of peeking into the stash but my prompt timing goes for ~60 mS with this off to ~700 mS with it enabled.

Most helpful comment

I just noticed this while testing settings changes and thought it seemed like a cool option to turn on - until I noticed my prompt update time increase about 10x. When I get a chance I'll take a quick look to make sure there isn't nothing obvious we're doing to slow it down. If so, I'll close it.

All 5 comments

I would believe this… git stash [list] delegates to git log which is not particularly snappy when navigating reflogs. Use at your own risk, I suppose? I generally recommend not using stashes at all, so I have no love for this option.

I just noticed this while testing settings changes and thought it seemed like a cool option to turn on - until I noticed my prompt update time increase about 10x. When I get a chance I'll take a quick look to make sure there isn't nothing obvious we're doing to slow it down. If so, I'll close it.

Hey fellas, just wanted to follow up to see if there was any head way with this?

Not really. git stash list is just slow.

I suppose one option would be to count lines in .git/logs/refs/stash directly?

Looks like other see the issue with git stash list being slow - https://github.com/msysgit/git/issues/259. In general, I think we try avoid going behind Git's back.

Was this page helpful?
0 / 5 - 0 ratings