Android: FPS halt when doing things for the first time

Here is what I am doing:

  1. I recycle an object using a recycle manager
  2. Play a particle effect when a gameobject is recycled.

The problem is this: It gives a total FPS stop when the first gameobject is recycled. But after this it runs smoothly at 56fps. I tested this on a single core and dual core android devices, both had the same issue. On the PC there are no issues. I do not have the Pro-lisence so I can’t use the profiler.

Are there any common reasons for Android devices for this sort of behaviour?

Maybe do a monkey fix. Do a recycle on awake or start? :slight_smile:

Which recycle manager are you using? It seems that this particular one is doing lots of things when used the first time, maybe instantiating several objects to let them in the pool. You could follow @Vonni’s suggestion and create the first objects at Start, so after that you would have no more hiccups. Another suggestion: try a simple object pool script like the one in this answer.