perf: tons of performance improvements. Lazy should now load in about 1.5ms for 97 plugins

This commit is contained in:
Folke Lemaitre 2022-11-24 22:04:23 +01:00
parent 711834f17c
commit 2507fd5790
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
11 changed files with 220 additions and 278 deletions

View file

@ -12,6 +12,7 @@ local used = {}
---@type table<string,string>
local cache = {}
---@return string?
function M.get(key)
if cache[key] then
used[key] = true