Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Performance Issues with Alpha 15

Discussion in '2020.2 Beta' started by mjc33, Jun 18, 2020.

  1. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    Since upgrading from Alpha 13 performance has dropped greatly - I'm getting around half the framerate in the editor on average with the exact same scene, and a lot of stuttering if moving the camera.

    Alpha 15:



    Alpha 13:



    Edit - to add a bit more info I've been updating the latest 2020 alpha as they've been released since December, this is the first time I've seen any negative change in performance after an update.
     
    Last edited: Jun 18, 2020
  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    A rather weird issue I've read somewhere here in the forums is that performance turned really awful after an Unity update and for whatever reason, this issue vanished after resetting the window layout via "Window > Layout > Default". You could give that a try as well.

    Otherwise have you looked at the Unity Profiler and/or Unity Profile Analyzer already, to find out what got slower?
    Are you able to reproduce this with any project?
     
  3. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    64
    I have exactly the same problem. I was wondering if I was becoming crazy. The strangest part is that :
    • I have very different FPS counts (from the editor) with the same scene. It's not varying, it's stable, but I can have 40 FPS one time and 60 FPS another time after relaunching the scene.
    • I have a quite higher FPS count with the build. Even though it's still less than before the a15, it's at least 10FPS more than my 1/3 resolution window (from 50 to 60) and 20 to 25 FPS more than the maximize window that still has a smaller resolution (from 35 to 60).
    Very weird ! btw, in the profiler, it's the famous RenderTexture.SetActive that takes almost half of the scene time.
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Hi
    Sorry you are facing these. Besides using the Profiler tools Peter mentioned to maybe figuring out more detauls on these, could you please file bugs for these? Ideally everyone encountering it filing one instead of relying on another bug report to cover their instance of this, unless you are absolutely, 100% sure it's the same one (because especially performance bugs tend to get lumped together by false association based on surface level expressions of these bugs).

    If you've already nailed this down to a15 (or at least the narrow range of a14-a15) it should be something we would be able to track down just by having a repro project and bisecting this. You can also ping the issue ID in here to facilitate us finding these bugs in our bug data base and associating them with this thread.
     
    mjc33 and ROBYER1 like this.
  5. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    64
    I put the layout to default and it looks much better, the RenderTexture.SetActive() went from 6/8 ms to less than 1ms.
     
    mjc33, MartinTilo and Peter77 like this.
  6. mjc33

    mjc33

    Joined:
    Oct 9, 2019
    Posts:
    26
    I tried putting the layout to default and it had no effect. I don't have any experience with profiler to know what I'm looking at, but this is what I get with Alpha 15



    And here is Alpha 13



    It looks to me like the physics is the major difference between the two?
     
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Yeah, looks like it but double the frame time causing double the FixedUpdate rate also makes sense. So you'd need to check individual FixedUpdate intervals from both captures. Looks like they got more to do in a15 for some reason. Both the blue scripting sample for scripting FixedUpdates, as well as the orange physics one seems to be doing more. The olive green samples under the blue scripting one seem to be new and could be interesting to check out.

    Also interesting would be to check if the Physics Profiler Modules show any difference.

    Also, getting to know the Profiler more is always time well spend so this might be a good opportunity to dig in a bit. Its manual pages should help you get started and this unite now presentation could help as well.

    If nothing in your project changed between these versions, it still warrants a bug report. Physics taking longer to process is yet another good step at narrowing it down and should be speeding up the processing of the bug ticket once filed
     
    mjc33 likes this.
  8. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    The tl;dr to understand this is to switch the profiler to the hierarchy view, since that's the one that's actually readable and useful. Timeline is only worthwhile for DOTS/Unity internals, and even then barely.
     
  9. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    YMMV, especially in this case since there could be significance to the density and amount of physics jobs getting spawned and run on the job threads which would be a bit more tricky to see in hierarchy view...

    Anyways, the other alternative is to load those two captures into Profile Analyzer which would allow a smoothened (because aggregated over multiple frames) and more direct comparison.
     
  10. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,431
    Additionally, Hierarchy view here could indeed be useful to check for differences outside of Physics and Fixed Update, i.e. in the samples that have a base scope that occurs once per frame because they are Update/Render rate related. Even if that risks looking only at half the Rendering timenif you don't check the Rendering thread too.

    If the regression is outside of that rendering/Update bound loop and instead in the fixed rate loop, or a combination of both, the nature of hierarchy view to group samples together would murky this up instead, making the fixed rate side look more impactful than it is. True, comparing fixed update ticks in timeline view visualy against each other isn't quite as nice a workflow as getting all the numbers crunched on it, but it can also help to avoid miscalculate that importance here.

    Raw Hierarchy can maybe be a compromise at the high level markers but might make it trickier towards the leaves, and still doesn't show job thread activity along side it.

    So really, all 3 views have their strength and weakness, and the workflows in all three could use (and will continue to get some) improvements. Also different people may prefer to process info in a more visual, high level map way instead of the table / tree view that needs digging to not make your judgment on what causes issues too early. Lastly, different backgrounds and experiences and depth of experience and adopted workflows while Profiling informs what view one may prefer at any given time.

    So I don't really see any need to paint any one of these views into too tight a corner. Even if the potential physics angle, as well as the rendering side on this could be accredited as "Unity Internals". I don't really see a GameObject style scripting issue in this.
     
    Baste likes this.