Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use caching where possible #172

Open
willothy opened this issue Oct 3, 2023 · 0 comments
Open

Use caching where possible #172

willothy opened this issue Oct 3, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@willothy
Copy link
Owner

willothy commented Oct 3, 2023

TODO: Use caching to speed up render, and use autocmds to update state.

Cokeline's renders are essentially O(n) where n is the number of visible buffers. On my machine, with a relatively complex setup this ends up at almost 1ms per buffer at times, which is not great even though it doesn't visibly degrade nvim's performance. We should be able to use per-buffer caching to speed this up significantly, since we should only need to recompute the properties of each component when the state changes.

Redraw events needed:

  • Hover
  • Dragging
  • Buffer creation / deletion / update events
  • Harpoon update events (if harpoon is integrated)
@willothy willothy added the enhancement New feature or request label Oct 3, 2023
@willothy willothy added this to the 1.0.0 Release milestone Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant