问题
Many times when I swipe iOS notifications from the top, and back to the app, then SceneKit
fps drops to 40. Sometimes it happens also after minimising and maximising app. How come? Can this be overcome somehow? I tried pausing SceneKit
when app becomes inactive, and resuming when it's back, but this is not helping.
回答1:
I've noticed this, too. In several different frameworks that use constant frame refreshing or are tied to the CADisplayLink as part of their presentation process.
I suspect, but have never been able to confirm, iOS is polling the performance of frame refreshing apps when they start, when they come out of inactive states, and when they're re-revealed after being obscured by system functions - like the notifications - and throttling to a guestimated rate without hiccups based on the polling results.
You can read more about my earlier thoughts on the matter here: SpriteKit scene with low fps on start
and here:
Inconsistent SceneKit framerate
There are many comments on similar experiences in SpriteKit, you can read here: https://forums.developer.apple.com/thread/14487
So it's not just SceneKit, and there's no apparent answer, and the problem varies in extent and nature between iOS versions, but has been lurking for many years.
来源:https://stackoverflow.com/questions/42012120/scenekit-drops-to-40-fps