perf: move autoloader to cache and always use lazy's modname path resolver which is much faster

This commit is contained in:
Folke Lemaitre 2022-12-28 17:57:59 +01:00
parent 956164d27d
commit 34977c2b80
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
5 changed files with 128 additions and 54 deletions

View file

@ -25,10 +25,8 @@ function M.setup(spec, opts)
end
local start = vim.loop.hrtime()
if not (opts and opts.performance and opts.performance.cache and opts.performance.cache.enabled == false) then
-- load module cache before anything else
require("lazy.core.cache").setup(opts)
end
-- load module cache before anything else
require("lazy.core.cache").setup(opts)
local Util = require("lazy.core.util")
local Config = require("lazy.core.config")