[PR #157] [MERGED] Use dynamicCast() to cast fetchedObjects to [T]? without checking the type. #472

Closed
opened 2025-12-29 15:32:29 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/157
Author: @ruslanskorb
Created: 3/24/2017
Status: Merged
Merged: 3/28/2017
Merged by: @JohnEstropia

Base: developHead: fetched-objects-dynamicCast


📝 Commits (1)

  • f055c54 [ListMonitor] Use dynamicCast() to cast fetchedObjects to [T]? without checking the type.

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 Sources/Observing/ListMonitor.swift (+2 -2)

📄 Description

Type checking takes a time. So there is a performance problem when casting a large number of fetched objects to an array of a certain type using the operator as?.


🔄 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/JohnEstropia/CoreStore/pull/157 **Author:** [@ruslanskorb](https://github.com/ruslanskorb) **Created:** 3/24/2017 **Status:** ✅ Merged **Merged:** 3/28/2017 **Merged by:** [@JohnEstropia](https://github.com/JohnEstropia) **Base:** `develop` ← **Head:** `fetched-objects-dynamicCast` --- ### 📝 Commits (1) - [`f055c54`](https://github.com/JohnEstropia/CoreStore/commit/f055c54a6684807f8843bbff936226f17a020381) [ListMonitor] Use `dynamicCast()` to cast `fetchedObjects` to `[T]?` without checking the type. ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Sources/Observing/ListMonitor.swift` (+2 -2) </details> ### 📄 Description Type checking takes a time. So there is a performance problem when casting a large number of fetched objects to an array of a certain type using the operator `as?`. --- <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 15:32:29 +01:00
adam closed this issue 2025-12-29 15:32:29 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#472