-
-
Notifications
You must be signed in to change notification settings - Fork 28
pcall(require, <missing module>)
takes a long time
#20
Comments
Hm, so the nvim-treesitter module isn't located anywhere in your runtime path? If this is a regular case where a module doesn't exist, might need to figure out how to do a faster fall-through. |
pcall(require, <missing module>)
takes a long time
It is probably because we maintain the original vim loader, and we add 3 of our own. One solution would be to just remove neovims original loader.
Interesting idea, we could do that. Problem is I'm not sure how to bail the loading process and skip all the loaders. Maybe redefining |
... and completely replace vim._load_package This speeds up statements like: pcall(require, 'does.not.exist') Since 'require' doesn't need to search through as many loaders and hence results in less calls to nvim_get_runtime_file(). Resolves #20
... and completely replace vim._load_package This speeds up statements like: pcall(require, 'does.not.exist') Since 'require' doesn't need to search through as many loaders and hence results in less calls to nvim_get_runtime_file(). Resolves #20
... and completely replace vim._load_package This speeds up statements like: pcall(require, 'does.not.exist') Since 'require' doesn't need to search through as many loaders and hence results in less calls to nvim_get_runtime_file(). Resolves #20
Fixed with #46 |
ref: lukas-reineke/indent-blankline.nvim#213
tldr; a piece of code like this
is about 366% slower (~6 ms -> ~22 ms) with impatient.nvim enabled when nvim-treesitter, nvim-treesitter.query, and nvim-treesitter.indent don't exist
The text was updated successfully, but these errors were encountered: