aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/health.lua
diff options
context:
space:
mode:
authorRiley Bruins <ribru17@hotmail.com>2025-01-01 11:33:45 -0800
committerChristian Clason <ch.clason+github@icloud.com>2025-01-07 16:43:45 +0100
commitd9ee0d2984e5fc30cb032785d32f42c72c7e64e1 (patch)
treee4f3c6e9be47fb20dcef3cfa0253da7699e50ce7 /runtime/lua/vim/health.lua
parentb67fcd0488746b079a3b721ae4800af94cd126e1 (diff)
downloadrneovim-d9ee0d2984e5fc30cb032785d32f42c72c7e64e1.tar.gz
rneovim-d9ee0d2984e5fc30cb032785d32f42c72c7e64e1.tar.bz2
rneovim-d9ee0d2984e5fc30cb032785d32f42c72c7e64e1.zip
perf(treesitter): don't fetch parser for each fold line
**Problem:** The treesitter `foldexpr` calls `get_parser()` for each line in the buffer when calculating folds. This can be incredibly slow for buffers where a parser cannot be found (because the result is not cached), and exponentially more so when the user has many `runtimepath`s. **Solution:** Only fetch the parser when it is needed; that is, only when initializing fold data for a buffer. Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'runtime/lua/vim/health.lua')
0 files changed, 0 insertions, 0 deletions