Search Unity

Unity 5.5 iOS: Excessive Memory and Performance Increases when Upgrading from 5.4.2

Discussion in 'iOS and tvOS' started by scottharber, Jan 12, 2017.

  1. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    Hello all,

    I'm in the process of upgrading an iOS project to Unity 5.5 (from 5.4.2). I profiled it on a few devices, and I'm seeing significantly worse performance on OpenGLES devices (between 2-5 frames lost), and big leaps in the memory usage on GLES3 and Metal devices (a delta of between 60 - 150MB!). For the latter, I'd use the profiler to investigate, but it doesn't seem to work in 5.5 either.

    Is the increase in memory/performance a known issue with 5.5? Is there a known fix for it? Are there new Unity standard render passes or anything similar that I need to disable for mobile (my game uses entirely custom shaders)?

    iPhone 6:
    55_i6_6cargarage.png

    iPhone 5C:
    55_i5_6cargarage.png

    iPod Touch 5:
    55_i4S_6cargarage.png
     
  2. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Could you please submit a bug report and attach the project that reproduces the slowdown? Please post the bug number here.

    If the project is larger than 0.5GB or so, please still submit the bug report, we will send you a link to where to upload the project via email.
     
  3. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    Hi povilas,

    Unfortunately, I can't share the project. It's about 30GB in size, and bound by NDA :(

    I tried making a small testbed project to compare the memory usage (just a sphere in a blank environment) and found a disparity of 3MB memory / 1ms GPU on iPhone 6. Would this suffice for the bug report? If so, I can share the testbed project?

    Testbed project - 5.5 on iPhone 6:
    Memory550_Metal.png

    Testbed project - 5.42 on iPhone 6:
    Memory542_Metal.png
     
  4. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    I sent the report with the testbed project attached.
     
  5. JonPQ

    JonPQ

    Joined:
    Aug 10, 2016
    Posts:
    120
    We are having similar issues...(game runs on 5.4, runs out of memory on 5.5 on S3 and 4S) is there any resolution to this yet ?
     
  6. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    @JonPQ Unity's QA team are still investigating it with me. I'm providing them with before&after memory trace data tomorrow.

    The current working theory is that it's to do with shader initialisation, which had an extensive update in 5.5. The memory starts off much worse, but comes back down to a reasonable level after about 5 minutes of play.

    In the meantime, have you tried the 5.6 beta? The memory is still higher than 5.4, but not as high as it was in 5.5.
     
  7. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    New information:

    I did the same test using Unity 5.6, and the memory appears to be roughly the same as 5.4.2. In most cases, 5.6 is actually cheaper, but is ~8MB higher on iPod Touch 5.

    Screen Shot 2017-04-26 at 10.18.52.png