From 516b173780e39de3ce1e4525f0a8f0ff250c992b Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 13 Jul 2023 10:17:19 +0100 Subject: 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. --- test/functional/lua/runtime_spec.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/functional') 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) -- cgit