Replace Inspector pending stack usage with loop#107947
Replace Inspector pending stack usage with loop#107947Repiteo merged 1 commit intogodotengine:masterfrom
pending stack usage with loop#107947Conversation
aa0c2f4 to
21c4121
Compare
|
I'm having second thoughts on this... the set datatype would be useful for reducing repeat calls for when a user changes the same property multiple times in one update cycle (which is around twice a second, I don't know the specific number). For example when playing an animation in the editor, numeric properties can be interpolated every process frame, while the inspector is only updated every ten or twenty. Unless I'm missing something this is probably the reason why the @KoBeWi thoughts on whether the tradeoff is important? |
|
I checked and not sure if there is a way to trigger duplicate property updates. Although the main improvement in this PR is getting rid of this weird stack-like usage, which makes no sense. That change is independent from the type of |
21c4121 to
c40853e
Compare
|
I reduced the PR to just remove the stack-like pattern for |
pending type to Vectorpending stack usage with loop
c40853e to
fbd51de
Compare
fbd51de to
f191fc8
Compare
|
Thanks! |
Currently, the variable used to store variables with pending changes to update the inspector dock is stored as a HashSet. This likely had a reason in the past, but in the current state of the codebase, this is only treated incorrectly like a stack. In other words, a HashSet is being used like a stack, but with the memory cost of a HashSet.
This PR changes the type of
pendingto aVectorto be more in line with the current use of the variable.