Closed osrf-migration closed 6 years ago
Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).
I looked a bit into this. Indeed, in my system, your message is taking about 18 seconds to be initialized, and during this time the UI is frozen.
Future updates to the UI are much quicker though, changing a field's value or adding / removing a nested message takes less than 30 ms. To me, this suggests the bottleneck is not the message parsing, which also happens for every update, but the widget creation.
My first idea would be to move the widget creation to another thread, and only do the actual adding of it to the window on the main thread. This wouldn't solve the delay problem, but at least the UI should not be frozen.
Need to investigate more to figure out if there's anything specifically bad we're doing when generating the widgets.
Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
We've been recently discussing about this issue. If we cannot improve the performance of Parse()
on widget creation, we could also try to create the widget only when the user clicks to expand a given level of the tree widget. This could also happen asynchronously in a different thread. This way we don't have to load all widgets in a single shot, it will happen sequentially as the user continues expanding more branches of the scene tree widget.
Original report (archived issue) by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).
I'm a publishing an
Ignition.msgs.Scene
message with a few models and links. It takes more than 10+ seconds to load all the fields in the TopicInterface plugin. My preliminary profiling points toMessageWidget::Parse()
.Here's how to reproduce it:
Terminal 1:
Terminal 2: Paste the content of this snippet.