Skip to content

Fix performance issue when get_git_detached_head() returns nil#232

Merged
glepnir merged 1 commit intonvimdev:mainfrom
chunleng:vcs-get_git_detached_head-fix
May 27, 2022
Merged

Fix performance issue when get_git_detached_head() returns nil#232
glepnir merged 1 commit intonvimdev:mainfrom
chunleng:vcs-get_git_detached_head-fix

Conversation

@chunleng
Copy link
Copy Markdown
Contributor

When get_git_detached_head() returns nil (i.e in the middle of rebasing), get_git_branch lags the cursor movement as get_git_detached_head() is being called every move.

Since the function is relatively heavy, we should just cache it until the cache invalidates

@glepnir
Copy link
Copy Markdown
Member

glepnir commented May 27, 2022

Thanks for PR

@glepnir glepnir merged commit b12853a into nvimdev:main May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants