perf: cache handler groups

This commit is contained in:
Folke Lemaitre 2022-11-26 22:04:32 +01:00
parent 05a0da532b
commit 42c2fb42c8
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 40 additions and 40 deletions

View file

@ -207,6 +207,8 @@ function M.load()
if M.dirty then
Cache.dirty = true
elseif state then
require("lazy.core.handler")._groups = state.handlers
end
end
@ -215,6 +217,7 @@ function M.save()
local state = {
---@type table<string, LazySpec>
specs = {},
handlers = require("lazy.core.handler").group(Config.plugins, true),
config = Config.options,
}