Search Issue Tracker

By Design

Votes

0

Found in

6000.0.14f1

Issue ID

UUM-77482

Regression

No

The "SerializedObject.UpdateIfRequiredOrScript" is being called periodically and taking extra time when the connected asset is not being manually reloaded

--

-

How to reproduce:
1. Open the “simple-graph“ project
2. Open the “SampleScene“
3. Open the “Assets > SimpleAsset.asset“ in the Inspector
4. Open the “Simple/Graph Editor“ window
5. Open the “Analysis/Profiler“ window
6. Enable Deep Profiling
7. Profile the Main Thread in the Edit Mode

Expected result: At every third frame the “SerializedObject.UpdateIfRequiredOrScript_Injected()“ does not take extra time
Actual result: At every third frame the “SerializedObject.UpdateIfRequiredOrScript_Injected()“ takes extra time

Reproducible with: 6000.0.14f1
Could not test with: 2021.3.42f1, 2022.3.41f1 (“ListView.overridingAddButtonBehavior“ not implemented, not resolvable errors in the “SimpleBlackboard.cs“ script)

Reproducible on: macOS 14.5 (Intel), Windows 10 Pro (22H2)
Not reproducible on: No other environments tested

Notes:
- The higher time consumption can be observed when the “SimpleAsset“ is opened in the Inspector
- For the Windows machines the “SerializedObject.UpdateIfRequiredOrScript_Injected()“ shows more frames apart (might be between 3 to 23 frames apart)
- More information in the comments

  1. Resolution Note:

    Thank you for bringing this issue to our attention. After careful consideration, we have determined that this is as designed. The SerializedObject.UpdateIfRequiredOrScript will be called on a regular basis by the editor binding system to know if any change needs to be applied to the UI. So this recurring method call is to be expected. We have plans to improve this in the future, but we cannot give an exact timeline for when we'll be able to start tackling these improvements to the binding updates.

    The profiler times we are seeing with the repro project are to be expected and taking less than 1-2 ms in deep profile mode, which can add a lot of overhead (can be at least ~10x).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.