aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/optionstr.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-07-13 10:17:19 +0100
committerGitHub <noreply@github.com>2023-07-13 10:17:19 +0100
commit516b173780e39de3ce1e4525f0a8f0ff250c992b (patch)
treeafd6b0148b9a02e1e33859aa437b9348024ec5a3 /src/nvim/optionstr.c
parent998bebc15e9de70b3daaaa5900e974dea5abda3e (diff)
downloadrneovim-516b173780e39de3ce1e4525f0a8f0ff250c992b.tar.gz
rneovim-516b173780e39de3ce1e4525f0a8f0ff250c992b.tar.bz2
rneovim-516b173780e39de3ce1e4525f0a8f0ff250c992b.zip
perf(rtp): reduce rtp scans (#24191)
* perf(rtp): reduce rtp scans Problem: Scanning the filesystem is expensive and particularly affects startuptime. Solution: Reduce the amount of redundant directory scans by relying less on glob patterns and handle vim and lua sourcing lower down.
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r--src/nvim/optionstr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
index a0ffecbad0..3750574613 100644
--- a/src/nvim/optionstr.c
+++ b/src/nvim/optionstr.c
@@ -2036,10 +2036,8 @@ static void do_spelllang_source(win_T *win)
}
}
if (p > q) {
- vim_snprintf(fname, sizeof(fname), "spell/%.*s.vim", (int)(p - q), q);
- source_runtime(fname, DIP_ALL);
- vim_snprintf(fname, sizeof(fname), "spell/%.*s.lua", (int)(p - q), q);
- source_runtime(fname, DIP_ALL);
+ vim_snprintf(fname, sizeof(fname), "spell/%.*s.*", (int)(p - q), q);
+ source_runtime_vim_lua(fname, DIP_ALL);
}
}