aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_help_html.lua
diff options
context:
space:
mode:
authorMathias Fussenegger <f.mathias@zignar.net>2024-05-13 17:26:57 +0200
committerLewis Russell <me@lewisr.dev>2024-05-14 09:42:10 +0100
commit8bb67d64e20d2e0d3e1892cb89d9bb8f558471e4 (patch)
tree84313181d3f85373f7d992fe21d5d6b0385eca93 /scripts/gen_help_html.lua
parente889f6781b19b091c23c78741ba2dfe54a34b758 (diff)
downloadrneovim-8bb67d64e20d2e0d3e1892cb89d9bb8f558471e4.tar.gz
rneovim-8bb67d64e20d2e0d3e1892cb89d9bb8f558471e4.tar.bz2
rneovim-8bb67d64e20d2e0d3e1892cb89d9bb8f558471e4.zip
perf(fs): normalize path only once in fs.dir
Re-normalizing a path after a `joinpath` isn't necessary. Calling `normalize` on each child directory had quite a bit of impact when traversing a large directory. A simple test showed: Before: ~144ms After: ~80ms running the following logic against a dir with 4367 child folders and 25826 files: local files = {} local start = uv.hrtime() for name, type in vim.fs.dir(path, { depth = max_depth }) do table.insert(files, { name, type }) end local duration = uv.hrtime() - start Relates to https://github.com/neovim/neovim/issues/23291
Diffstat (limited to 'scripts/gen_help_html.lua')
0 files changed, 0 insertions, 0 deletions