aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/runtime_spec.lua
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 /test/functional/lua/runtime_spec.lua
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 'test/functional/lua/runtime_spec.lua')
-rw-r--r--test/functional/lua/runtime_spec.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/lua/runtime_spec.lua b/test/functional/lua/runtime_spec.lua
index 7d3d640265..aa682cad19 100644
--- a/test/functional/lua/runtime_spec.lua
+++ b/test/functional/lua/runtime_spec.lua
@@ -118,12 +118,14 @@ describe('runtime:', function()
it('loads vim compilers when both lua and vim version exist', function()
local compiler_file = compiler_folder .. sep .. 'new_compiler'
- write_file(compiler_file..'.vim', [[let b:compiler = 'vim']])
- write_file(compiler_file..'.lua', [[vim.b.compiler = 'lua']])
+ exec('let b:compiler = "compiler"')
+ write_file(compiler_file..'.vim', [[let b:compiler = b:compiler.'_vim']])
+ write_file(compiler_file..'.lua', [[vim.b.compiler = vim.b.compiler..'_lua']])
exec('compiler new_compiler')
- eq('vim', eval('b:compiler'))
+ -- lua version is sourced after vim
+ eq('compiler_vim_lua', eval('b:compiler'))
end)
end)