SwiftData app always at 100% cpu when idle after upgrading to Xcode 15.3

Our app is using SwiftData + SwiftUI. After upgrading to Xcode 15.3 Beta, RC1, RC2, we’ve experienced the same issue that the app is having 100% CPU activity even when left idle. This happens as long as the SwiftUI is using @Query to fetch SwiftData and the query does return at least 1 result (there is no issue if the query returns empty result).

We’ve tried the following and therefore confirmed that this is a Xcode 15.3 beta issue:

  • Xcode 15.3 Beta + iOS 17.2 -> 100% CPU activity when idle
  • Xcode 15.3 Beta + iOS 17.4 beta -> 100% CPU activity when idle
  • Xcode 15.2 Beta + iOS 17.2 -> normal

This only happens during debug run. When profiling / using instrument, this doesn't happen.

Same

SwiftData app always at 100% cpu when idle after upgrading to Xcode 15.3
 
 
Q