I’m building a game for iPhone 4 and I’m trying to reach a consistent 60 fps. The main issue I’m having is that seemingly random functions are spiking. They’d normally take a millisecond or sometimes next to no time at all but occasionally those same functions take 10-20 milliseconds. The spikes seem to happen about 4 times a second and it is never consistent as to which functions take a long time.
Is there something I am unaware of like say if my Object count is to high will the iPhone need to page memory or something like that? I’m running out of ideas as to why this is happening.
Any suggestions would be appreciated. Thanks.