diff options
author | Riley Bruins <ribru17@hotmail.com> | 2024-09-25 11:33:14 -0700 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-09-25 23:01:08 +0200 |
commit | 64847fbdc908bf0a301b8f1e1814ff71bd425bae (patch) | |
tree | 9b305dcfe6a3f0e41de042ca24fc7363f010d821 /runtime/lua/vim/_meta/vimfn.lua | |
parent | 921dc22fc0909bd0fdec2ebf42bb39de26347944 (diff) | |
download | rneovim-64847fbdc908bf0a301b8f1e1814ff71bd425bae.tar.gz rneovim-64847fbdc908bf0a301b8f1e1814ff71bd425bae.tar.bz2 rneovim-64847fbdc908bf0a301b8f1e1814ff71bd425bae.zip |
perf(treesitter): use `child_containing_descendant()` in `is_ancestor()`
**Problem:** `is_ancestor()` uses a slow, bottom-up parent lookup which
has performance pitfalls detailed in #28512.
**Solution:** Take `is_ancestor()` from $O(n^2)$ to $O(n)$ by
incorporating the use of the `child_containing_descendant()` function
Diffstat (limited to 'runtime/lua/vim/_meta/vimfn.lua')
0 files changed, 0 insertions, 0 deletions