git_bash_windows_powerline icon indicating copy to clipboard operation
git_bash_windows_powerline copied to clipboard

Speed up last_status by avoiding wc -l

Open stuaxo opened this issue 4 years ago • 0 comments

On my system using native bash functions instead of wc -l speeds up the last_status by about 0.2 seconds. This may be because windows pipes are slow or some issue with wc.

Before:

 master
last_status: 0.463
user_info: 0.066
cwd: 0.071
scm: 2.549

After:

last_status: 0.228
user_info: 0.079
cwd: 0.073
scm: 2.714

Performance numbers aren't exact as they vary a bit, but you can see a bit difference in the runtime for last_status.

stuaxo avatar Oct 02 '19 11:10 stuaxo