Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Graphics performance degradation with updating from 5.4.x

Discussion in 'General Graphics' started by Gulliver, Dec 12, 2017.

  1. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    A week ago I was forced to update Unity from 5.4 (5.4.5p5) to 2017.2 (2017.2.0p4). This happened because MacOS has been updated to High Sierra and Unity 5.4 doesn't support new MacOS file system (APFS).

    At the forum (see the following link) - https://forum.unity.com/threads/unity-and-macos-10-13-high-sierra.474527/ was mentioned: "There will be no Unity 5.4.x fixes for High Sierra, you have to either keep your machines on macOS 10.12 or upgrade your project to Unity 5.5.x and later".

    So, I tried all releases from 5.5 to 2017.2.

    To my deep regret, on all versions, I encountered significant performance degradation compared with 5.4.

    The specificity of our project is in models with a complex hierarchy and a large number of details. On the screenshot below you can see that Vought F4U Corsair model contains about 700 parts and 250k polygons with seven textures and one specular shader, optimised for mobile devices. It's one of our most complicated model used for benchmarking, other models are much simpler.

    But performance drop can be seen in the other models also.



    Benchmark results 5.4.5 -> 2017.2.0
    Code (CSharp):
    1. Xiaomi Redmi Note3, 2016:        45 -> 30 (33%)
    2. Xiaomi MiMax2, 2017              34 -> 23 (32%)
    3. Samsung Galaxy S5, 2014          25 -> 18 (28%)
    4. Amazon FirePhone, 2014           39 -> 29 (25%)
    5. Huawei M3, 2016                  35 -> 29 (17%)
    6. Samsung Note4, 2014              35 -> 30 (14%)
    7. Lenovo A Plus, 2016:             16 -> 14 (13%)
    8. Samsung Galaxy Tab A,  2016:     27 -> 24 (11%)
    As you can see, this performance drop affects modern and old devices, and percentage can reach 33%. Despite drop level different for devices, we can't allow inconvenience of our users -- it will cause lots of negative feedbacks and game rating decrease.

    I searched for similar problems, found several discussions but they didn't help. Most of them advised to turn on Multithreaded Render (already turned on), disable OpenGLES 3 (helped a little on the some devices, but caused even more performance drop on the others), or optimise scene (impossible, the scene contains only 3d model, without physic/animation/AI/effects/etc.).

    So, release the game with such performance degradation is definitely not an option. Now I have to return back to the Unity 5.4.5. This is even worse because I have to roll back the MacOS version to Sierra...

    If some Unity engineers are interested in resolving this problem -- I'll be happy to cooperate. I can provide anything to replicate those results.

    Here you can find some screenshots of 5.4.5p5 and 2017.2.0p4 versions made in the profiler (full resolution of every screenshot is provided):

    5.4.5p5 CPU. Full resolution >>

    5.4.5p5 Render. Full resolution >>


    2017.2.0p4 CPU. Full resolution >>

    2017.2.0p4 Render. Full resolution >>
     
    Last edited: Dec 12, 2017
    Martin_H and zreek17 like this.
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Hi Gulliver!

    Please submit a bug report with a minimal project to reproduce this (your test scene looks very nice btw :)).
    The profiler screenshots show that the Camera.render() call takes less % of CPU time in 2017.2 than in 5.4, it would be very interesting to see, what is actually taking more time (you screenshots miss this information).
    Please post the bug number here once sumbitted.

    Thanks!
     
    karl_jones and richardkettlewell like this.
  3. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Okay. I'll contact you ASAP
     
  4. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Hi again!

    I just created the simplified project with Corsair plane only and build it on 5.4.5p5 and 2017.2.0p4 Unity



    Performance drop:
    Code (CSharp):
    1. Xiaomi MiMax2, 2017            23 -> 15 (34%)
    2. Xiaomi Redmi Note3, 2016:      28 -> 21 (25%)
    3. Amazon FirePhone, 2014:        32 -> 24 (25%)
    4. Samsung Galaxy S5, 2014:       18 -> 15 (16%)
    5. Samsung Note4, 2014:           21 -> 18 (14%)
    6. Samsung Galaxy Tab A,  2016:   22 -> 19 (13%)
    7. Xiaomi Mi5, 2016:              38 -> 35 (7%)
    8. Lenovo A Plus, 2016:           13 -> 12 (7%)


    Everybody can download APK and check results by links:
    5.4.5p5 -- http://noble-empire.com/unity/corsair545p5.apk
    2017.2.0p4 -- http://noble-empire.com/unity/corsair201720p4.apk

    Working on the bug report...
     
    Last edited: Dec 18, 2017
    zreek17 likes this.
  5. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    ok, thanks!
    I've picked it up, will check it (probably in the beginning of January).
     
  7. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Great !
     
  8. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Any news ?
     
  9. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Not yet, I'll take a look this week.
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Hi!

    It did get slower in certain places, I'll continue investigating. This will take some time, though, so please be patient. I'll give an update when I have more info.
    Btw, the code obfuscation was not necessary. It just makes it harder to understand which function is in the timeline in the profiler.
     
  11. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Great, thanks. I'll wait.
     
  12. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    Hello again, @Gulliver

    Our internal tests do not show the same performance difference as your project does. So it seems it's specific to your project.
    However, because the project is quite large and the code obfuscated, it's hard to say, what exactly is causing this.
     
  13. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    That's right, the project is very large. But as you can see -- the demo scene is quite simple.
    It contains only one model. No physic, no animations, no AI, etc.
    I suppose you have examined all Profiler data. Where is performance drop ?
    I can provide non-obfuscated sources if you are interested in this problem.
    Or, just because the project is large -- this is only my problem ?
     
    Last edited: Jan 23, 2018
    zreek17 and bombsquare like this.
  14. Mykolas_M

    Mykolas_M

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    6
    Sorry for the long delay. Would it be possible to provide the bare minimum project, with the least amount of code possible, where the issue still persists, and no obfuscation please.
     
  15. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Thank for reply. I tried to reproduce slowdown on the bare project with the scene only but difference almost invisible.
    Already spent more than a week to figure out. Only one thing I can see -- different render times in the profiler.
    Do you see it?

    As I said before -- nothing was changed in the project what can explain such dramatic performance slowdown.
    I can't spend several more weeks for cutting one part of the project after another in order to find what part updated Unity doesn't like. That's why I asked for help. I thought you have all instruments for compare performance and locate the bottleneck.

    I can provide project without obfuscation if it'll help.
     
  16. Gulliver

    Gulliver

    Joined:
    Jan 8, 2013
    Posts:
    101
    Nobody interested?