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.
More info:
Xcode 15.3 stable release + iOS 17.3 -> 100% CPU activity when idleXcode 15.3 stable release + iOS 17.4 stable -> 100% CPU activity when idleXcode 15.2 + iOS 17.4 stable -> normalSame here. I have a swiftData app, that was working fine. Upgraded to XCode 15.3 stable last night, and suddenly CPU usage is basically 100%, in the simulator (iOS 17.4) even when the app is just sitting idle. Downgraded to XCode 15.2, and the problem is gone. CPU usage ~1% when idle.
Forgot to mention, this was both on a device, and in the simulator.