Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 2, 2022

  1. refactor: use nvim_set_hl to speed up startup time

    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
    cljoly committed Oct 2, 2022
    Configuration menu
    Copy the full SHA
    4e6f0e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e589ba1 View commit details
    Browse the repository at this point in the history