diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-13 10:17:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 10:17:19 +0100 |
commit | 516b173780e39de3ce1e4525f0a8f0ff250c992b (patch) | |
tree | afd6b0148b9a02e1e33859aa437b9348024ec5a3 /runtime | |
parent | 998bebc15e9de70b3daaaa5900e974dea5abda3e (diff) | |
download | rneovim-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 'runtime')
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 558cc75d65..a66d77910b 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -231,6 +231,10 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. :runtime plugin/**/*.vim < would source the first file only. + For each {file} pattern, if a file has both a `.vim` + and `.lua` extensions, the `.vim` version will be sourced + first. + When 'verbose' is one or higher, there is a message when no file could be found. When 'verbose' is two or higher, there is a message diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 53a14c586f..b287b43e92 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -506,12 +506,12 @@ accordingly, proceeding as follows: 10. Load the plugin scripts. *load-plugins* This does the same as the command: > - :runtime! plugin/**/*.vim - :runtime! plugin/**/*.lua + :runtime! plugin/**/*.{vim,lua} < The result is that all directories in 'runtimepath' will be searched for the "plugin" sub-directory and all files ending in ".vim" or ".lua" will be sourced (in alphabetical order per directory), - also in subdirectories. First "*.vim" are sourced, then "*.lua" files. + also in subdirectories. First "*.vim" are sourced, then "*.lua" files, + per directory. However, directories in 'runtimepath' ending in "after" are skipped here and only loaded after packages, see below. |