[PR #47] [CLOSED] Fix: Optimize ForEach in BlockGridView to improve compilation time #51

Closed
opened 2025-12-29 04:20:31 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ivanvorobei/SwiftUI/pull/47
Author: @jchillah
Created: 3/3/2025
Status: Closed

Base: masterHead: fix/compiler-performance


📝 Commits (1)

  • 4924346 Fix: Optimize ForEach in BlockGridView to improve compilation time

📊 Changes

1 file changed (+42 additions, -32 deletions)

View changed files

📝 Other Projects/2048 Game/SwiftUI2048/Views/BlockGridView.swift (+42 -32)

📄 Description

  • Moved map operation outside ForEach to reduce compiler complexity
  • Used indices instead of direct iteration to optimize performance
  • Ensured better type-checking and improved readability
  • Fixed SwiftUI rendering issue related to dynamic block creation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ivanvorobei/SwiftUI/pull/47 **Author:** [@jchillah](https://github.com/jchillah) **Created:** 3/3/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/compiler-performance` --- ### 📝 Commits (1) - [`4924346`](https://github.com/ivanvorobei/SwiftUI/commit/4924346633722395f299d6b32deab7a4ef01ff38) Fix: Optimize ForEach in BlockGridView to improve compilation time ### 📊 Changes **1 file changed** (+42 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `Other Projects/2048 Game/SwiftUI2048/Views/BlockGridView.swift` (+42 -32) </details> ### 📄 Description - Moved map operation outside ForEach to reduce compiler complexity - Used indices instead of direct iteration to optimize performance - Ensured better type-checking and improved readability - Fixed SwiftUI rendering issue related to dynamic block creation --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:20:31 +01:00
adam closed this issue 2025-12-29 04:20:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/SwiftUI#51