- Home /
Spikes on iPhone3/4 every other minute. Any ideas how to find out why and/or get rid of them?
Hello,
we're making a game for iOS. When testing on iPhone3 and 4, the performance is fine, but every other minute we get a very short but noticable stutter.
Normally I'd suspect that's the garbage collector, but the profiler shows nothing pointing in that direction - rather stable memory, no garbage collector peaks in the profiler. Instead, I got those candidates:
Mesh.DrawVBO
CullSceneObjects
Device.Present
Mesh.SubmitVBO
And occasionally Physics.Simulate
Sometimes but rather seldom one of our scripts
Here's a link to some profiler example pictures - note that I'm not on the frame so you can see the actual spike, but I markek the method so you can see which one causes the spike.
Assuming that it might have to do something with the level we had, I made a simple level with a static camera. The character you see rolls and jumps. There is a simple NGUI gui involved to control the character. Nothing else is happening - still, spikes.
Here are the logs from the iPhone Unity internal profiler:
I'll try to make an even more simple level, but I thought it couldn't hurt to ask now - maybe somebody has an idea.
We're using:
Unity 4.5
NGUI 2.7
2D Toolkit, newest version
So, in conclusion, we get a noticable stutter every other minute even in a rather simple level. We aren't creating new objects as far as I see and memory seems fine to me.
Have you tried removing NGUI and tk2d from your project? $$anonymous$$ight also help to know if any of the 4.5 patches solve your issue.
Answer by unimechanic · Oct 08, 2014 at 02:32 PM
There is a simple NGUI gui involved to control the character. Nothing else is happening - still, spikes.
Test removing NGUI, if the spikes go way you can also ask the author who might know how the problem is related to that plugin.
Your answer
![](https://koobas.hobune.stream/wayback/20220613152430im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Negative Render Time for iPhone Internal Profiler 2 Answers
Profiler Physics.Simulate spikes 2 Answers
Game runs smoother when profiling on an iPad 2/iPhone 4s, sluggish otherwise 0 Answers
iOS Photo Gallery 0 Answers
Game crashing on iOS after 3 second load of new scene. (How can I optimise loading) 0 Answers