SwiftUI Table severly hangs on @FetchRequst predicate/sort change (macOS 14.3, Xcode 15.2)

Originator:stefan.lorenz.pauwels
Number:rdar://FB13639482 Date Originated:21.02.2024
Status: Resolved:Open
Product:SDK Product Version:
Classification: Reproducible:
 
Changing nsSortDescriptors or nsPredicate on a simple SwiftUI FetchRequest with lots of simple items (10.000) leads to severe hangs when displaying a SwiftUI Table on macOS.

The performance for the identical setup is OK, as soon as a List is used instead of a table.

Reproduce:
1. Open the attached sample project in Xcode
2. Set run destination macOS
3. Run the app
4. Klick the „Add 10000 items“ button
5. Leaving the app in „List“ mode, change the sort order to „Descending“
6. Note the performance: Noticeable pause, but OK
7. Change the app to „Table“ mode
8. Change the sort order back to „Ascending“

Expected: 
- Similar reordering performance as in list
Actual: 
- Severe hangs

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!