Search Issue Tracker
By Design
Votes
0
Found in [Package]
12.0.0
Issue ID
1311843
Regression
No
Unity CPU usage spikes to 30% when Time Node is connected to any other Node in ShaderGraph
How to reproduce:
1. Open the "ShaderGraphTime.zip" project
2. Open the "Time" Shader Graph in the Project window
3. Connect Time Node to Multiply Node in the Shader Graph window
4. Observe the CPU usage in Task Manager/Activity Monitor
Expected result: No spike in CPU usage
Actual result: 30% CPU usage spike
Reproducible with: 7.5.3 (2019.4.20f1), 10.2.2 (2020.2.5f1), 11.0.0 (2021.1.0b7), 12.0.0 (2021.2.0a5)
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
- Crash on SkinnedMeshRendererManager when interacting with a prefab generated with uncombined meshes using Synty Sidekick Character Creator
- Crash on folly::detail::safe_assert_terminate_v when updating the Meta XR SDK Packages
- The text font falls back on a different font depending on the fallback font used
- Template is opened in Isolation when opening it in Context and users Save the UI Document when prompted to do so in UI Builder
- Mono Windows Builds don't produce full log callstacks when generating logs
Resolution Note:
The time node causes the node previews to re-render every frame, which definitely costs a bit of CPU.
I took a quick look at the profiler in 2021.2, and I didn't see anything unexpected in the costs.
There are a few things we could probably optimize a bit more, and there are a few things on our backlog to address there, but I didn't see anything that would count as a bug.
The rendering cost is proportional to the number of visible previews that are animated (connected to a time node upstream).
You can hide all the previews to get rid of the cost.
Definitely send it back to us if you can't get rid of the cost by hiding the previews, or if you can find evidence in the profiler that something bad is going on.
Thanks!