Performance lag every 1 second on iphone 4s

I’m currently developing a 3d runner for Android and iPhone and just recently got my iphone license. I’ve been testing the game so far on my Android device and it runs fine, however now testing on iPhone for the first time the game seems to lag roughly every 1 second at a constant interval. It’s only a fraction of a second but its really noticeable, and this is an iPhone 4s so really shouldn’t be having any processing difficulties. After the game has been played for a while, the lag stops and the game runs seems to run fine from then on.

  • None of my scripts only run once
    every second, or any consistant
    interval that could be triggering
    this
  • I have multiple animations on
    the character, and the scene is
    decorated, however all models are
    very low poly, and there is always
    less than ~1500 polys on screen at a
    time
  • All texture resolutions are 256x256 or less
  • The level is loaded in small intervals (every 5 seconds), so it’s not required to process the entire 3d world at a time

Any ideas as to what it could be or how i could track down what is causing it?

EDIT:
keep in mind after running through the scene a few times it will not lag again going through the exact same scene

Hi,

We are facing the same issue : game lags like every second on iPhone 4S, but not on iPod4 or IPhone 3GS.

Weird thing (answering your question Azuri) is that this lag disappears when using Unity Profiler, you can actually switch the lag on and off playing with the built-in profiler.

Any advice would be awesome,
Best,
Philippe

I’ve faced the same problem with hours of debugging and optimising, and I think I found a solution.

In my case, I deselect Development build and everything is smooth as ice.

Hope this help you.