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

Bug URP runtime performance regression

Discussion in '2021.2 Beta' started by PutridEx, Jun 21, 2021.

  1. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    case# 1344888

    URP is quite a bit slower in 2021.2 beta 1. I'm doing my tests on 2020.3.11
    It's slower in editor, and in standalone builds.

    I've made sure all settings are the same, went over them one by one, most new beta settings aren't enabled by default currently. Same shadows, processing, etc.

    information:

    Using direct11, windows.
    Versions checked:
    2021.1.12: No regression
    2020.3.11.f1: No regression
    2021.2.21: Regression found
    2021.2.1 (beta one): Regression found:

    All profiling and testing done on builds, not in editor. (it says playmode in profiler, but it is profiling the build)

    I'll include some editor data though.

    LTS Editor FPS & scene image:
    Beta Editor FPS & scene image:

    LTS in-editor average is around: 100 FPS(10.0ms)
    beta in-editor average is around: 81 FPS(11.9ms)

    Profiler (from a build, not in editor):
    LTS: https://i.imgur.com/Oi5Rk7G.png
    2021.2 BETA 1: https://i.imgur.com/tl526lI.png
    You can click on the image to zoom in.

    profiler says playmode, ignore that -- it is 100% build data.
    it says that because I profiled the build, then closed the build (game). So it went back to display 'playmode' since the connection was lost. even though the data in there is from the build.
     
    Last edited: Jul 2, 2021
    Lurking-Ninja and hippocoder like this.
  2. IDK if it was intentional or not, but you ended up including only editor data, not just some.
    Something is allocating in your second example, so something is vastly different, I think it would worth to take a look. GC-ing can easily have 1-1.2ms difference in a frame. Also check the GC setting, see if disabling the incremental garbage collection makes a difference.
     
  3. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Look at the bottom, the profiler is from a build. I don't imagine people would need a picture when they have the profile to see everything.

    I'll probably include profiler for editor too, just didn't get to it yet.

    Asset wise, I don't think anything is different. It's the exact same scripts, same quantity, same assets, and same placement. Just upgraded materials to work with URP. And it had the same performance before the beta.

    If something is allocating all of a sudden, it probably has to do with the the version. And the second example, if you mean the profiler, is the beta.

    I just noticed, for some reason it says playmode, but it is profiling the build standalone, and not the editor. Weird. I checked and it is correctly profiling the build.
     
    Last edited: Jun 22, 2021
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    Seems like the difference is related to Graphics Jobs?

    Can you try turning Graphics Jobs off in both and see if the performance becomes more similar?

    Also 32B of garbage aren't enough to trigger the garbage collector often enough for it to matter.
     
    PutridEx likes this.
  5. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Building these scenes takes a long time for me, hopefully I'll do it at some point.
     
  6. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Also i believe graphic jobs don't run in the editor, but even there it's still quite a bit slower.
     
    AcidArrow likes this.
  7. Both says "Playmode". Unless it's a bug in the editor, playmode usually means running in the editor.
    This is a profiler profiling a build:
    screenshot1.png


    FYI: incremental GC has "a lot" of overhead. (I mean measurable, it worth to check)
     
  8. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I was hoping you'd read the entire post before replying:(
    both have inc GC, so if it's causing this, it's still regression since it was fine before the beta.
    Although I'll try a build with it disabled, eventually.. hopefully. Building takes so long. :/
     
    Lurking-Ninja likes this.
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    You can record something in the profiler and then close the build and look at it later, at which point it can say whatever it wants up there and it doesn't really matter.
     
  10. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    That's what I did, I guess that's why it happened.
     
  11. Sorry, when I started my response the bold text wasn't in your post yet. :)

    If you're certain that your data is a build, it should be reported as a bug. It is a very important problem.
     
    PutridEx likes this.
  12. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I just checked and profiled the build again -- same data as pictures. I believe acid is correct, I saved the data and closed the game so it went back and showed 'playmode' name but it is build data.
     
    Lurking-Ninja likes this.
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Report a bug so that shiny 3090 reward makes it not-slow.
     
  14. I reported this as a UX bug (case 1344885). Since it's not a beta problem, I haven't included the beta hashtag, so I leave the video card reward for you so you can run your URP project better. :D

    @MartinTilo you may be interested in this misunderstanding (If not, sorry for the summon :)). Possible improvement in the profiler UX.
     
    Last edited by a moderator: Jun 22, 2021
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    There is no bug here though, the dropdown is an indicator of what you want to capture and not a label of what the data's supposed to be from.
     
  16. I know, but some kind of indication, where the data is coming from would be good. Either in the dropdown or anywhere else.
     
  17. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Checked more versions. Versions marked with * had tests only in the editor and not standalone builds.

    2021.1.12*: No regression
    2020.3.11.f1: No regression
    2021.2.21*: Regression found
    2021.2.0beta one: Regression found (most severe)


    bug sent
     
    Last edited: Jun 22, 2021
  18. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,723
    I actually agree, but that's more of a feature request than a bug.
     
  19. I know, I should have said "issue" here, for what it worth, I submitted this, so it's an "issue", rather than a "bug":
    Loaded profiler data nowhere says it's from file and if it's from editor or build

    1. What happened
    2. How can we reproduce it using the example you attached

    It's not a real "bug" in terms of faulty working, it's a UX issue.

    - run the profiler either in playmode or in a build
    - observe that the dropdown shows where the profiling happens (Playmode or <computer name> - <build>)
    - save the profiler data into file
    - close the profiler
    - open the profiler
    - load back the file
    - the profiler always says Playmode no matter where the data is coming from and there is no indication it's loaded from file and what kind of profiler data the file contains.

    Screenshot included for clarity.
     
  20. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Last edited: Jun 22, 2021
    NotaNaN and PutridEx like this.
  21. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,449
    @Lurking-Ninja it's indeed a thing we want to eventually solve but, among other things: you can currently mix profiler sessions, can have only one Profiler window open and we're not really storing any session metadata with the profiler data yet to make such a display more meaningful than the captured connection or file name. So there'd be too many caveats with it currently and other changes, some that would build towards this, were higher prio so far.
     
    PutridEx and Lurking-Ninja like this.
  22. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    adamgolden, cxode, NotaNaN and 5 others like this.
  23. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    The performance fix is going to be available in 2021.2.0b3 :)
     
    laurentlavigne, Ruchir, cxode and 6 others like this.
  24. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Great!
    Now my case report is quite redundant, I noticed I haven't posted the case number here :D
    1344888