Tom Wilson
Tom Wilson

Reputation: 159

iOS App performance degrades when it shifts to efficiency cores on my iPhone

I am developing a realtime vision processing app on Xcode 12.4 and iOS 14.3 and have an issue where after being on for a random amount of time, the app stops using my iPhone's performance cores and shifts over to the efficiency cores. This accompanies a marked drop in FPS. The queue used for the bulk of the CPU work (rendering via cgContext and then conversion using CIImage(cgImage) is as follows:

private let dataOutputQueue = DispatchQueue(label: "video data queue", qos: .userInteractive, attributes: [.concurrent], autoreleaseFrequency: .workItem)

I am surprised that a .userInteractive queue would shift over to efficiency cores like this given that it is not able to keep up.

My question is, why would performance cores just stop working like this? Can I not assume that I can retain use of the performance cores? Picture from Instruments attached for reference.

Instruments Image

Upvotes: 5

Views: 421

Answers (1)

Kurtle
Kurtle

Reputation: 75

I have run into this exact issue (same instruments trace as above) and found no code solution that fixes. However, I can only reproduce on iOS 14.x. It seems with iOS 15.1 that this is no longer an issue.

For me it was very deterministic, slow down after 45s +/- 1s of load, shutdown for 5s +/- 5s, and then rebound. It would happen every run on iOS 14.x, but I have yet to see it happen in iOS 15.

I have opened an Apple Technical Support Request, will update if they respond.

Upvotes: 1

Related Questions