kiyoon / jupynium.nvim

Selenium-automated Jupyter Notebook that is synchronised with NeoVim in real-time.
MIT License
520 stars 15 forks source link

perf: cache `cells.line_types_entire_buf` to avoid repeated calls #90

Closed kiyoon closed 1 year ago

kiyoon commented 1 year ago

Note that a proper fix is doing partial update just like it is done in the python package, using vim.api.nvim_buf_attach with on_lines. See src/jupynium/buffer.py for its logic.

Due to the complexity, this is a temporary fix that will cache the result and avoid re-calculation of line types.

Fixes #89