iOS8 on iPhone6 framerate running at 20FPS! (WTH)

I’m testing my new game. It is a 3D zombie shooter.

On Unity Editor i get >100FPS.

On my iPhone4S (iOS7) i set it to 30FPS and i’m getting roughly 30FPS.

On my iPhone5S(iOS7) i set it to 60FPS and i’m getting roughly 57-60FPS.

On my iPhone6(iOS8) i set it to 60FPS but the frame rate is dropping down to 20FPS. The Menus run at a smooth 60FPS. When i start playing the game i’m get 60FPS but all of a sudden it drops all the way to 20FPS and struggles between 20-33FPS.

I really don’t know WTH is going on. It looks like it’s an iOS8 issue.

Is there anyone else having this sort of issue?

Thanks for the feedback, but I really think you should try it with profiler attached to see exactly what is causing the issue as currently no one can tell what the problem is. We know there is bad performance when it comes to new software as I’m sure Unity 5 beta has many fixes…

Resolution on the iPhone 6 is larger. Therefore any performance gains from the 5s to the 6 will be lost. Case in point with the 6 plus…

“Earlier, AppleInsider noted that Apple’s own leap to a Retina HD 1080p screen on iPhone 6 Plus resulted in graphics that were in some cases slower at their native resolution than last year’s iPhone 5s: rendering a challenging OpenGL ES 3.0 3D scene dropped frame rates from 24.4 to 19 fps.”

While your code or even unity might still have performance issues when dealing in specific areas of multiple threads being handled within iOS 8, I believe the biggest hit is coming from the increase in resolution and additional patches needed for iOS 8. Just my two cents.

Thanks for both of your replies. Too bad i have Unity free so i can’t use profiler.

Maybe 30 Day Pro Trial…

WhosTheBoss,

It’s just too hard to say without completely understand everything you might be trying to do and how you might be attempting to do it.

New_guy,

The game is for iOS only. The concept of the game is simple, the main character just shoots zombies.

Now, in my splash screen, i detect which iOS device by looking at iPhone.Generation, if it’s older devices (iPhone4,4s, iPod 3rd generation, iPad3 etc) i set the Application.TargetFreamRate to 30 and i set the MAX_ZOMBIE_COUNT to 10 so only 10 zombies can be spawned at a time.

However, if the game is running on newer devices (iPhone5,5s,6, 6+, iPad 5th gen etc) i set the the framerate to 60 and max_zombie_count to 28.

I build the project, load up Xcode6, I have all kinds of iPhones and iPads in my house. i build the game into all my iOS devices and all of them run perfectly as coded.

The older devices(iOS6 to iOS7) run at 30FPS and plays very smooth at 30FPS with 10 zombies attacking the player.

The newer devices(iOS7) run at 60FPS and plays very smooth at 60FPS (57-60FPS) with 28 zombies attacking me.
But, on the my iPhone6(iOS8), it starts of at 60FPS then as i’m playing the game it drops to 20FPS, at times it is at 18FPS which is totally unplayable!

It is really annoying me, some times i’ll play it on my iPhone6 and it plays at 60FPS no problem but other times it will drop down to 20FPS.

I really don’t get it! How can an older iPhone5 and 5s run at 60FPS with 28 zombies BUT a newer more powerful iPhone6 struggles with low framerates with the same 28zombies on screen.

I think the folks at Apple sacrificed some CPU/GPU performance for better battery on iOS8. Which is probably why they launched the Metal API.

Yea, i’m gonna try the 30-day pro

Is vsync set to true in quality setting?

You should start looking into Xcode debugger navigator, here on FPS tab you will how much time spent on CPU vs GPU. This will give you insights if you are CPU or GPU bound.

Mantas,

looking there, the CPU is really bugged out, looks like the CPU is very busy calculating something, the process delay times are exceeding 30ms ( i think, i cant remember the exact times. I’ll check when i get home)

But i do remember that when ever the frame rate drops, the CPU processing time increases.

Too bad you haven’t noticed that Unity free has a built-in (non-graphical) profiler.

Here’s a screenshot.

Graham,
are you referring to the Statistics window in the Game view?

As you can see in the screen shot i attached. The CPU is damn near 40ms in rendering a frame. This is on my iPhone6.

But, On my iPhone5 and 5S, the CPU time barely reaches double digits and the iPhone5/s are always at 60FPS.

looks like cpu is taking up most of the time. That’s unusual. Also, why is it showing that data in the console when it should be showing allocations etc? did you toggle it on?

What is being wrote to disk just before the drop?

My Xcode console has always shown that, i did not know you can change the contents you want it to display. Yes! it’s very unusual for the CPU to be performing so much task. I’m completely lost in what to do.

New_To_Unity_Guy,
I’m not sure what was loaded, i’ll do more tests to figure out what was read/write from disk.

  1. Are you loading a new scene without removing the old from the stack?
  2. Are you making use of Prefabs?
  3. How many scripts are you using?
  4. OR did you split them up to specific game objects?
  5. Have you changed the delta time?
  6. Are you using Fixed Update OR Update?

Also, click on your CPU tab to check how many threads are running.

This is what I mean:

It’s a profiler for unity free and it’s built in. See that page:

I’m not sure what was read/written to disk but i’ve sat here and watched it, there were other read/writes to the disk and there was no drop. Moreover, it has also dropped when there was no read/write to disk at all.

So the read/write is not the cause.

unfortunately, i had a busy day so i didn’t get a chance to do more analyzing. I will try what everyone has suggested.

BUT…

One thing to keep in mind is this: Let’s just say my memory management skills are poor, Now why in the glory heck is an old 2012 iPhone5 technology staying at 60FPS (same game, same script, same binary, same build, same amount of characters on screen)
But a 2014 more powerful iPhone6 is barely pushing out 25FPS?

My gut instincts are telling me that is has to do with how iOS8 runs on iPhone6.