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

vim startup 150ms slower since #93 #100

Open
liskin opened this issue Aug 31, 2024 · 1 comment
Open

vim startup 150ms slower since #93 #100

liskin opened this issue Aug 31, 2024 · 1 comment

Comments

@liskin
Copy link

liskin commented Aug 31, 2024

$ git checkout baac332
$ nvim --startuptime /tmp/nvim-bad.txt
$ grep 'sourcing.*cmp_nvim_ultisnips' /tmp/nvim-bad.txt
247.983  000.147  000.147: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
248.239  143.683  119.665: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua

vs

$ git checkout baac332^
$ nvim --startuptime /tmp/nvim-good.txt
$ grep 'sourcing.*cmp_nvim_ultisnips' /tmp/nvim-good.txt
097.585  000.098  000.098: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
097.729  001.621  000.779: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua

Still not okay with current main (2be0eda):

cmp_nvim_ultisnips.snippets')
099.720  000.308  000.181: require('cmp_nvim_ultisnips.source')
099.758  000.037  000.037: require('cmp_nvim_ultisnips.config')
099.760  000.547  000.202: require('cmp_nvim_ultisnips')
099.862  000.015  000.015: sourcing /home/tomi/.vim/pack/bundle/start/ultisnips/plugin/UltiSnips.vim
100.122  000.011  000.011: sourcing /home/tomi/.vim/after/plugin/UltiSnips.vim
100.658  000.074  000.074: sourcing /usr/share/nvim/runtime/autoload/provider/pythonx.vim
123.710  000.209  000.209: sourcing /usr/share/nvim/runtime/autoload/remote/host.vim
123.822  023.446  023.163: sourcing /usr/share/nvim/runtime/autoload/provider/python3.vim
124.147  000.017  000.017: sourcing /usr/share/nvim/runtime/autoload/provider.vim
208.096  000.336  000.336: require('cmp_nvim_ultisnips.treesitter')
208.358  000.038  000.038: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/autoload/cmp_nvim_ultisnips.vim
208.607  109.468  085.057: sourcing /home/tomi/.local/share/nvim/site/pack/bundle/start/cmp-nvim-ultisnips/after/plugin/cmp_nvim_ultisnips.lua
@liskin
Copy link
Author

liskin commented Aug 31, 2024

Probably the best way to fix this would be to introduce a wrapper autoload/cmp_nvim_ultisnips_utils.vim (or .lua, required late) that loads the python script and provides wrapper functions, to make sure it's loaded lazily.

liskin added a commit to liskin/dotfiles that referenced this issue Sep 1, 2024
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

No branches or pull requests

1 participant