pwntester / octo.nvim

Edit and review GitHub issues and pull requests from the comfort of your favorite editor
MIT License
2.36k stars 127 forks source link

Octo.nvim runs a slow network-IO-bound shell command during startup #478

Closed idanarye closed 8 months ago

idanarye commented 8 months ago

Issue Description

Type: bug report

Describe what happened (or what feature you want)

After I updated my plugins, Neovim's startup time noticably increased to more than a second. A bit of profiling led to Octo.nvim - specifically to the recently added setup function of the octo.gh module. This function runs gh auth status command, which needs to make network requests against GitHub and delays the entire startup process.

Describe what you expected to happen

This command should run asynchronously so that it wouldn't block Neovim's startup. That is - Octo.nvim's setup will not be complete when require'octo'.setup{} returns, but instead progress in the background.

How to reproduce it (as minimally and precisely as possible)

  1. Install Octo.nvim
  2. Configure Neovim to run require'octo'.setup{} on startup.
  3. Run nvim
pwntester commented 8 months ago

Thanks for reporting it. Would you mind testing https://github.com/pwntester/octo.nvim/pull/479 and checking if it fixes the issue for you?

idanarye commented 8 months ago

Yup. That solved it.