Skip to content

Use caching where possible #172

Open
@willothy

Description

@willothy

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions