Skip to content

perf(ui): Optimize popup autocmd lifecycle and inline preview namespace caching#5

Merged
mhiro2 merged 3 commits intomainfrom
perf/ui-autocmd-lifecycle
Feb 10, 2026
Merged

perf(ui): Optimize popup autocmd lifecycle and inline preview namespace caching#5
mhiro2 merged 3 commits intomainfrom
perf/ui-autocmd-lifecycle

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Feb 10, 2026

Summary

This PR improves UI event handling performance and autocmd lifecycle management around popup-related flows.

Changes

  • Scope CursorMoved handling to peekstack popup buffers instead of a global autocmd path.
  • Cache inline preview namespace ID at module level in inline_preview.lua.
  • Move TabClosed autocmd registration in stack_view.lua from module-load time to setup() time.
  • Wire stack_view.setup() from peekstack.setup().

Why

  • Reduce unnecessary work on global CursorMoved.
  • Avoid repeated namespace lookups in inline preview rendering.
  • Make stack-view autocmd registration more controllable and initialization-driven.

@mhiro2 mhiro2 self-assigned this Feb 10, 2026
@mhiro2 mhiro2 added the enhancement New feature or request label Feb 10, 2026
@mhiro2 mhiro2 merged commit cfacdb5 into main Feb 10, 2026
3 checks passed
@mhiro2 mhiro2 deleted the perf/ui-autocmd-lifecycle branch February 10, 2026 13:58
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

Successfully merging this pull request may close these issues.

1 participant