Too high startuptime #729
Replies: 5 comments 2 replies
-
Actually, you could use What do you think? @deathbeam |
Beta Was this translation helpful? Give feedback.
-
I know that, but I just don't like the way Lua plugins often have much higher startuptime than legacy Vimscript plugins just because they often try to load the whole plugin on startup, which is just unnecessary. Also among many active plugin managers for Neovim, lazy.nvim is the only one that supports such For the PR, I will need to make some refactoring. But I would like to ask some questions first.
The result is that all directories in 'runtimepath' will be searched
for the "plugin" sub-directory and all files ending in ".vim" or
".lua" will be sourced (in alphabetical order per directory),
also in subdirectories. First "*.vim" are sourced, then "*.lua" files,
per directory. That would also save users from having to run the function |
Beta Was this translation helpful? Give feedback.
-
Im not sure from where is the 80ms coming from, looking at log if I include the plenary loading there as well its like 5ms:
which is similar to something like fzf-lua. The plugin already loads only necessary stuff in setup too. You could technically move some requires to setup directly, but requires in any other function that is called more than once are unacceptable. I dont rly see a reason to change how default config works either, its fine as is. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
from timing it in my own config, whihc also includes optional fzf lua stuff. Idk, seems fine? could be better i guess but its also nowhere close to 40 times as slow as fzflua for me |
Beta Was this translation helpful? Give feedback.
-
Today CopilotChat.nvim has too hight startuptime (80ms).
I think I will send a pull request that refactor it a bit to lower startuptime. In the main file (init.lua), I will make it not require any other module at script level (but only in function level). This is to avoid unnecessarily loading all modules at startuptime. What do you think?
Beta Was this translation helpful? Give feedback.
All reactions