Skip to content

Optimize rendering performance in MiniMap#2

Merged
Atothendrew merged 1 commit into
mainfrom
claude/optimize-performance-W8XxP
Apr 11, 2026
Merged

Optimize rendering performance in MiniMap#2
Atothendrew merged 1 commit into
mainfrom
claude/optimize-performance-W8XxP

Conversation

@Atothendrew

Copy link
Copy Markdown
Owner
  • AnyMiniMapEntity: replace heap-allocated closures with directly stored
    values, eliminating per-access indirection and allocation overhead

  • updateEntityPositions: reuse existing SKShapeNode markers instead of
    removing and recreating every call; nodes are only reallocated when
    markerRadius changes (baked into the path), which avoids per-frame GPU
    resource churn for games with a stable entity count

  • updateCameraViewFrame: pre-compute scaleX/scaleY once per call and
    derive the viewport rectangle from four scalar clamps instead of
    constructing eight intermediate CGPoint structs

https://claude.ai/code/session_018t9xFejpw1oNq4KkKhKagR

- AnyMiniMapEntity: replace heap-allocated closures with directly stored
  values, eliminating per-access indirection and allocation overhead

- updateEntityPositions: reuse existing SKShapeNode markers instead of
  removing and recreating every call; nodes are only reallocated when
  markerRadius changes (baked into the path), which avoids per-frame GPU
  resource churn for games with a stable entity count

- updateCameraViewFrame: pre-compute scaleX/scaleY once per call and
  derive the viewport rectangle from four scalar clamps instead of
  constructing eight intermediate CGPoint structs

https://claude.ai/code/session_018t9xFejpw1oNq4KkKhKagR
@Atothendrew
Atothendrew merged commit 0bcdabf into main Apr 11, 2026
2 of 3 checks passed
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