-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use nvim_set_hl to speed up startup time #76
base: master
Are you sure you want to change the base?
Conversation
Using https://github.com/rhysd/vim-startuptime with
and after:
|
The latest commit will need to be squashed if this PR is merged, but in the meantime, it makes testers live easier because they can just pull from the branch.
|
After daily driving this change, I have not noticed any more discrepancies compared to |
This plugin initially started with |
Looking at the 0.7 changelog, it seems that |
Sure. Let me verify it this week and will merge if no issues |
Cool, let me know if you need help! |
Did you encounter any issues in the end? |
ping @navarasu , in case the notification just got lost. |
On my machine, prior to this change, the colorscheme adds about 8ms to the startup time of neovim. Using the newly introduced API `nvim_set_hl`, it’s a little under 3ms, so that’s more than a two times speedup! Special care is taken to handle the `fmt` argument, as that’s the least friendly to `nvim_set_hl`. This change strives to be backward compatible. Once neovim version 0.7.0 will be widely spread enough, further performance gain are within reach by: * removing the fallback that calls `string.format` * defining the `group_settings` so that those can be passed to `nvim_set_hl` directly
Rebased on the most recent master branch. |
let's get this merged... |
Bump! |
On my machine, prior to this change, the colorscheme adds about 8ms to
the startup time of neovim. Using the newly introduced API
nvim_set_hl
, it’s a little under 3ms, so that’s more than a two timesspeedup!
Special care is taken to handle the
fmt
argument, as that’s the leastfriendly to
nvim_set_hl
.This change strives to be backward compatible. Once neovim version 0.7.0
will be spread widely enough, further performance gain are within reach
by:
string.format
group_settings
so that those can be passed tonvim_set_hl
directly