aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/async/_queue.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2026-09-07 10:27:57 +0100
committerLewis Russell <me@lewisr.dev>2026-09-07 13:30:57 +0100
commitfdf071959e3b913e56a10f227f034b530a90be99 (patch)
treeb299f27f9b93ad396ceafbc188798c976a640c88 /runtime/lua/vim/async/_queue.lua
parenta31f9affde680d1b93b1283955764d247ee3bb4d (diff)
downloadrneovim-fdf071959e3b913e56a10f227f034b530a90be99.tar.gz
rneovim-fdf071959e3b913e56a10f227f034b530a90be99.tar.bz2
rneovim-fdf071959e3b913e56a10f227f034b530a90be99.zip
perf(watch): prune excluded subtrees during setup
Problem: The LSP client excludes paths such as Git objects and installed dependencies from file watching. However, watchdirs() still traverses these subtrees before filtering which directories receive watchers, paying the filesystem and Lua traversal cost for excluded content. Solution: Prune excluded subdirectories during the initial walk, and document that excluding a directory also excludes its descendants. Using the LSP client's existing **/node_modules/*/** exclusion on a synthetic macOS tree with 100 installed packages and 4,000 files: Before After Directory scans 503 103 Entries inspected 4502 202 Directory watchers 103 103 The measurements use real filesystem calls and watcher handles, with identical watcher paths for this exclusion. Ref: #23291 AI-assisted
Diffstat (limited to 'runtime/lua/vim/async/_queue.lua')
0 files changed, 0 insertions, 0 deletions