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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.