I created a own UI Update mechanism, due to the unity one was not useful for me. I need updates after the simulation in late update, i need to be sure, its executed there, to not run into UI issues, showing wrong data. This causes already some bugs. Also the Tests were not reliable, or the tests need to wait some realtime, before they click on the button... Nothing what we want to have.
The new one extend the VisualElement by some methods: RegisterUpdate(Action). The updateMethod can be passed directly. If its not needed to be executed every frame, there is a RegisterUpdateFast for 50 fps animating stuff and RegisterUpdateSlow for 4 times/second update for the not so urgent and expensive updates.
The given Method can also give back an action, that is executed after the other updates, what was needed, to make the own over method stable (too many bugs in unities events there...).
The slow function are spreading the executions randomly to the threads, so instead of executing 100 updates every 10 frame, every frame gets 10 update executions. This should keep the framerate more stable and in general higher.
I changed all updates of most of the UI components, so it can happen now, that some UI bugs are happening. I'm planning some testings next.