mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
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.
This commit is contained in:
@@ -729,13 +729,9 @@ void ex_compiler(exarg_T *eap)
|
||||
do_unlet(S_LEN("g:current_compiler"), true);
|
||||
do_unlet(S_LEN("b:current_compiler"), true);
|
||||
|
||||
snprintf(buf, bufsize, "compiler/%s.vim", eap->arg);
|
||||
if (source_runtime(buf, DIP_ALL) == FAIL) {
|
||||
// Try lua compiler
|
||||
snprintf(buf, bufsize, "compiler/%s.lua", eap->arg);
|
||||
if (source_runtime(buf, DIP_ALL) == FAIL) {
|
||||
semsg(_(e_compiler_not_supported_str), eap->arg);
|
||||
}
|
||||
snprintf(buf, bufsize, "compiler/%s.*", eap->arg);
|
||||
if (source_runtime_vim_lua(buf, DIP_ALL) == FAIL) {
|
||||
semsg(_(e_compiler_not_supported_str), eap->arg);
|
||||
}
|
||||
xfree(buf);
|
||||
|
||||
|
Reference in New Issue
Block a user