Search Issue Tracker
Won't Fix
Votes
0
Found in
2022.2.0b6
2023.1.0a8
Issue ID
UUM-12879
Regression
Yes
[Inspector] Inspecting ShaderGraph in Debug mode results in ~150ms CPU Scripts Usage and ~1.5 MB GC Alloc per frame
How to reproduce:
1. Open the user’s attached “InspectorBug” project
2. Change the Inspector window mode to “Debug”
3. Select the “MyGraph” ShaderGraph in the Project Browser
4. Observe the CPU Usage in the Profiler
Expected result: CPU Usage time is ~5ms and ~230B GC Alloc per frame
Actual result: CPU Usage time is ~150ms and ~1.5MB GC Alloc per frame
Reproducible with: 2022.2.0a9, 2022.2.0b6, 2023.1.0a8
Not reproducible with: 2020.3.38f1, 2021.3.8f1, 2022.1.14f1, 2022.2.0a8
Reproduced on: macOS 12.3 (Intel)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- URP Realtime reflection probes do not update when RenderProbe() is being called once per second
- Addressable terrain shader variants are stripped from the Player
- [iOS] Debug.Log() appears as <private> in Console app
- UI stays in the background when it is disabled in simulator
- A wrong log file is attached when project is launched with a "-logFile" command line argument
Resolution Note:
This is indeed a regression in performance but we cannot fix this performance as a simple bug fix. The reason performance has regressed is because the default inspectors are now drawn using UI Toolkit instead of IMGUI. UI Toolkit has to actually new/allocate each element, layout and style them, before anything can be drawn. It's a framework approach choice that is optimized for all-frames-but-the-first-frame, which is...the majority of frames, but it suffers a bit on the first frame performance.
We did a lot of work to alleviate this issue on the regular GameObject components inspector to time-slice the generation of UI and make the first frame a lot snappier. But for a large single debug inspector, we can't do much yet.
With all that said, we are actively working on this performance problem in UI Toolkit and this regression should gradually diminish in future versions.
If this is a show-stopper for you, you can switch back to the IMGUI Default Inspector in the Project Settings, and continue working with that option enabled.