Search Issue Tracker
Won't Fix
Unknown (hidden) 2022.2.X, 2023.1.X
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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
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.