Closed lewis6991 closed 3 years ago
it's about a 2x speedup from HEAD impatient.nvim in this case, but still 2x slower than stock
a W is a W :+1:
How exactly were you measuring the difference. I've added a test case that uses vim.loop.hrtime()
before and after the require
with a threshold of 1.2x. Did you do something similar? 2x still seems like a lot.
just calling a PackerProfile
with the the misbehaving plugin mentioned in https://github.com/lewis6991/impatient.nvim/issues/20 and noting the difference in load time. i could use a lua profiling plugin but it seems adequate
... 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