[PR #288] [MERGED] [ListMonitor] Fix performance of numberOfObjects(). #490

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

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/288
Author: @ruslanskorb
Created: 11/24/2018
Status: Merged
Merged: 12/6/2018
Merged by: @JohnEstropia

Base: developHead: list-monitor-number-of-objects-performance


📝 Commits (2)

  • 6f65595 [ListMonitor] [numberOfObjects()] Calculate the number of objects in all sections by summing the number of objects stored in NSFetchedResultsSectionInfo.
  • a9a73fa [ListMonitor] [numberOfObjects()] Return count of fetchedObjects.

📊 Changes

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

View changed files

📝 Sources/ListMonitor.swift (+1 -1)

📄 Description

There is a performance problem in Swift when calling count method on an array with a large number of fetched objects. It requires casting the array between Objective-C and Swift, that is pretty slow.


🔄 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/288 **Author:** [@ruslanskorb](https://github.com/ruslanskorb) **Created:** 11/24/2018 **Status:** ✅ Merged **Merged:** 12/6/2018 **Merged by:** [@JohnEstropia](https://github.com/JohnEstropia) **Base:** `develop` ← **Head:** `list-monitor-number-of-objects-performance` --- ### 📝 Commits (2) - [`6f65595`](https://github.com/JohnEstropia/CoreStore/commit/6f655951aa43c3f79fea1c39fd34cc688751fb77) [ListMonitor] [numberOfObjects()] Calculate the number of objects in all sections by summing the number of objects stored in `NSFetchedResultsSectionInfo`. - [`a9a73fa`](https://github.com/JohnEstropia/CoreStore/commit/a9a73fa5c44ccc7f77eacd1ca4da7597e9cd9a89) [ListMonitor] [numberOfObjects()] Return `count` of `fetchedObjects`. ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `Sources/ListMonitor.swift` (+1 -1) </details> ### 📄 Description There is a performance problem in Swift when calling `count` method on an array with a large number of fetched objects. It requires casting the array between Objective-C and Swift, that is pretty slow. --- <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:35 +01:00
adam closed this issue 2025-12-29 15:32:36 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#490