aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/shared.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-11-07 11:42:08 +0000
committerLewis Russell <me@lewisr.dev>2024-11-11 13:42:24 +0000
commitff575b38864022b0b27527f11636c49107acd1bc (patch)
treeb0d913557d2d8aeda0f4db42387292b7f913dfe5 /runtime/lua/vim/shared.lua
parentd0e78b587195d201d643f3e131dd1ea951d906db (diff)
downloadrneovim-ff575b38864022b0b27527f11636c49107acd1bc.tar.gz
rneovim-ff575b38864022b0b27527f11636c49107acd1bc.tar.bz2
rneovim-ff575b38864022b0b27527f11636c49107acd1bc.zip
perf(filetype): optimize internal data structures
This changes the type for the sorted pattern table from `vim.filetype.mapping[]` to `vim.filetype.mapping.sorted[]` E.g. instead of: ```lua { { ['/debian/changelog$'] = {'debchangelog', { parent = '/debian/' } }, { ['%.git/'] = { detect.git , { parent = 'git/', priority = -1 } }, } ``` It is now: ```lua { { '/debian/, '/debian/changelog$', 'debchangelog' }, { 'git/' , '%.git/' , detect.git , -1 }, } ``` Overall this should roughly cut the amount of tables used by 3, and replaces lots of hash indexes with array indexes.
Diffstat (limited to 'runtime/lua/vim/shared.lua')
0 files changed, 0 insertions, 0 deletions