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.

- 2,622
- 19
- 38
-
I am seeing this behavior also: I have 2 scenes on the screen at a time, each with a single regular, slowly rotating, low poly sphere and a 400 x 200 texture on each of them. I usually get a constant 120 fps but after I idle for a while or get a notification, the scenes stutter and get around 5 fps, even though Xcode says around 30. I also tried scene.isPlaying = true to no avail. However, I notice the cpu usage drops from ~50% to ~3%, like the app is throttling itself. RAM stays constant at ~60 mb – Brandon Slaght Apr 18 '17 at 04:53
1 Answers
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.
-
Thanks for your answer. I was using CADisplayLink in one place of my app - removed it to see if it helps, but didn't. Anyway, looks like there is nothing we can do right now. – Damian Dudycz Feb 03 '17 at 08:16
-
I also noted, that sometimes rotating the screen a few times helps, and SceneKit goes back to 60 fps. – Damian Dudycz Mar 25 '17 at 13:38