Projector.Render() spikes over 3 sec on iPad 2

Hi

I have been experiencing massive spikes on iPad 2 and have narrowed it down to a Projector.render() function. This is really weird since the projector is constantly running and takes ~0.5ms normally but sometimes it decides to take more than 3 seconds to render. There is no change to the projector or the objects that he is projecting on.

The projector is projecting onto a mesh renderer and ignoring everything else.

Here is my setup:

2652246--186891--ProjectorSetup.png

I am using Unity 5.3.4f1.

Any thoughts on what might be wrong?

Thanks!
Þorgeir Auðunn

Hey, a few questions :slight_smile:

  1. Does the same behaviour also happen while profiling in the editor? In the editor, you can set profiling to “deep profiling” so you may be able to have a more detailed drill-down into what’s causing the performance spikes.

  2. Can you post a screenshot of the CPU profiler in “Hierarchy” mode, and not to the timeline view? specifically, what is shown under the Projector.render() method? is there anything below it in the call chain ?

  3. Does this happen only on this particular device, or on all devices you test on ?

Hi liortal

  1. Unfortunately this is not happening in editor only on device.

  2. This happens rarely and randomly, forgot to take a screenshot of the last encounter will post when I catch it again. But here is a screen of the expected behaviour:

  1. This appears to happen only on iPad 2, have tested it on iPad Mini 2, iPad Air and iPhone 6s.

Thanks for the answer! :smile:

Cheers
Þorgeir

Did you start profiling after seeing a huge performance spike (e.g: game gets stuck for 3 secs) ?
The reason i’m asking is because the profiler may have its own overhead (profiling, sending the data, etc). So the issue happens also without profiling right ?

Also it would be interesting to see what also happens during that frame (are there any scripts that are taking long to run? other subsystems that are also slow, such as physics? etc)

Follow up when you see the issue again

Takk fyrir :slight_smile:
liortal

@Sir-Thorgeir

Could you please check whether the bug is reproducible on the latest patch release? If it is, could you submit a bug report and attach the reproduction project to it? Please submit the bug id here. Thanks!

@liortal Yes, this also happens when the profiler is not running.

@povilas Will do.

However this issue has not been showing itself again, I might have tweaked some setting that made the issue go away but If it pops up I will do a follow up. Note that I am still running on 5.3.4f