Search Unity

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

Discussion in 'iOS and tvOS' started by Sir-Thorgeir, May 27, 2016.

  1. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    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:
    ProjectorSpike.png ShadowProjector.png ProjectorSetup.png

    I am using Unity 5.3.4f1.

    Any thoughts on what might be wrong?

    Thanks!
    Þorgeir Auðunn
     
    Last edited: May 27, 2016
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Hey, a few questions :)

    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 ?
     
  3. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    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:

    Projector_Render_normal.png

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

    Thanks for the answer! :D

    Cheers
    Þorgeir
     
  4. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    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 :)
    liortal
     
  5. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    @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!
     
  6. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    @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