URP runtime performance regression

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: LTS FPS


Beta Editor FPS & scene image: beta FPS

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: Imgur: The magic of the Internet
2021.2 BETA 1: Imgur: The magic of the Internet
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.

2 Likes

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.

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.

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.

1 Like

Building these scenes takes a long time for me, hopefully I’ll do it at some point.

Also i believe graphic jobs don’t run in the editor, but even there it’s still quite a bit slower.

1 Like

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:
7258697--875591--screenshot1.png

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

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. :confused:

1 Like

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.

That’s what I did, I guess that’s why it happened.

Sorry, when I started my response the bold text wasn’t in your post yet. :slight_smile:

If you’re certain that your data is a build, it should be reported as a bug. It is a very important problem.

1 Like

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.

1 Like

Report a bug so that shiny 3090 reward makes it not-slow.

3 Likes

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. :smile:

@MartinTilo you may be interested in this misunderstanding (If not, sorry for the summon :)). Possible improvement in the profiler UX.

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.

I know, but some kind of indication, where the data is coming from would be good. Either in the dropdown or anywhere else.

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

I actually agree, but that’s more of a feature request than a bug.

I know, I should have said “issue” here, for what it worth, I submitted this, so it’s an “issue”, rather than a “bug”:
submitted UX issue text

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 - )
  • 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.

Maybe it’s related to new shader keyword system - Unity Issue Tracker - Performance regression with the new keyword system - shader keyword limits now 65K but performance cost is severe, till it’s optimized/tweaked (I hope…).

2 Likes