sainnhe / gruvbox-material

Gruvbox with Material Palette
MIT License
1.96k stars 166 forks source link

Startup time is 100ms slower than other colorschemes #91

Closed jinh0 closed 3 years ago

jinh0 commented 3 years ago
r=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210629-79768-y9kpng/build/config -I/tmp/neovim-20210629-79768-y9kpng/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210629-79768-y9kpng/build/src/nvim/auto -I/tmp/neovim-20210629-79768-y9kpng/build/include
Compiled by jinhoyoon@Jinhos-MacBook-Pro.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-f83c259_2/share/nvim"

Run :checkhealth for more info

Minimal vimrc that can reproduce this bug

call plug#begin('~/.vim/plugged')
  Plug 'sainnhe/gruvbox-material'
call plug#end()

let g:gruvbox_material_background = 'medium'

colorscheme gruvbox-material

Steps to reproduce this bug using minimal vimrc

Actual behaviour

Without Gruvbox-material (neovim default color scheme):

257.018  002.316: first screen update
257.023  000.005: --- NVIM STARTED ---

With Gruvbox-material:

...
135.243  030.771  029.377: sourcing /Users/jinhoyoon/.vim/plugged/gruvbox-material/colors/gruvbox-material.vim
...
169.787  031.235  029.843: sourcing /Users/jinhoyoon/.vim/plugged/gruvbox-material/colors/gruvbox-material.vim
...
341.530  003.071: first screen update
341.536  000.006: --- NVIM STARTED ---

Expected behaviour

Fast startup time.

Does anyone know what might be causing this slow speed for Gruvbox-material?

sainnhe commented 3 years ago

https://github.com/sainnhe/gruvbox-material/blob/6ccca9ddba1d1c1d17acf3eaccacd0016784eb40/doc/gruvbox-material.txt#L431-L445