Skip to content

Optimize resize performance with caching#4

Closed
mass2527 wants to merge 1 commit intomainfrom
claude/improve-performance-3wnk8
Closed

Optimize resize performance with caching#4
mass2527 wants to merge 1 commit intomainfrom
claude/improve-performance-3wnk8

Conversation

@mass2527
Copy link
Owner

  • Cache min sizes when tree changes instead of recalculating on every
    pointer move (eliminates 4 recursive tree traversals per resize event)
  • Replace O(n) Array.find() rect lookup with O(1) Map lookup
  • Pre-compute and store these caches in buildRectMap() and buildMinSizeCache()
    which run once per structural change rather than 60-120 times/sec during drag

This significantly reduces CPU overhead during panel resize operations.

- Cache min sizes when tree changes instead of recalculating on every
  pointer move (eliminates 4 recursive tree traversals per resize event)
- Replace O(n) Array.find() rect lookup with O(1) Map lookup
- Pre-compute and store these caches in buildRectMap() and buildMinSizeCache()
  which run once per structural change rather than 60-120 times/sec during drag

This significantly reduces CPU overhead during panel resize operations.
@claude
Copy link

claude bot commented Jan 22, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mass2527 mass2527 closed this Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments