Files
neovim/runtime/lua/vim
Mathias Fussenegger 8bb67d64e2 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
2024-05-14 09:42:10 +01:00
..
2024-04-30 07:04:42 +08:00
2024-03-06 10:45:22 +00:00
2024-04-26 15:13:06 +01:00
2024-01-16 09:33:10 +00:00
2024-01-19 11:54:04 +00:00
2024-03-16 19:26:10 +00:00
2024-03-06 10:45:22 +00:00
2024-05-05 06:08:17 +08:00
2024-03-16 19:26:10 +00:00
2024-04-30 07:04:42 +08:00
2024-03-16 19:26:10 +00:00
2024-03-09 11:21:55 +00:00