perf: added profiling for sourcing of runtime files

This commit is contained in:
Folke Lemaitre 2022-12-05 23:14:04 +01:00
parent 08d081f21d
commit be509c01f9
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 15 additions and 6 deletions

View file

@ -134,7 +134,9 @@ function M.source_runtime(...)
Util.walk(dir, function(path, _, t)
local ext = path:sub(-3)
if t == "file" and (ext == "lua" or ext == "vim") then
Util.track({ runtime = path })
vim.cmd("silent source " .. path)
Util.track()
end
end)
end