Search Issue Tracker
Won't Fix
Votes
1
Found in
5.5.1f1
Issue ID
889690
Regression
No
Value changes in UnityEngine.UI.Image/Text causes huge CPU usage in LayoutRebuilder
Huge lag spikes are encountered from Canvas.SendWillRenderCanvases() when UnityEngine.UI.Image or UnityEngine.UI.Text are modified
This happens when:
"color" of UnityEngine.UI.Image is modified
"enabled" of UnityEngine.UI.Image is modified
"text" of UnityEngine.UI.Text is modified
It also seems to happen when "color" of UnityEngine.UI.Text is modified
Steps to reproduce:
1. Open attached project.
2. Open the profiler window and look at the "UI" and/or "CPU" and "Memory" tabs.
3. Open scene "LayoutRebuild_PleaseDontKThx.unity".
4. Press "Play".
5. Alt+Click on the "Expand" arrow next to "Canvas" gameobject.
6. Select the last gameobject in that hierarchy.
7. Click on the "Color" widget of the "Image" component of that gameobject to open the color selection window.
8. Change the color constantly by changing a slider or picking in the spectrum of the color selection window.
9. Observe the lag in the profiler window.
Expected result: Changed values should not cause that much CPU usage
Actual result: Constantly being changed values causes huge CPU usage
Reproduced in: 2017.1.0a4, 2017.1.0a1, 5.6.0f1, 5.6.0b9, 5.5.2f1, 5.5.1f1, , 5.4.4p4, 5.2.2p3
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment