You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating scene objects, a small message is passed via a std::sync::mpsc channel which is later processed by the hub. This approach works well because it makes for an ergonomic API and is also thread safe; however, it may incur performance penalties for larger applications due to the pointer jumping and atomic operations.
I propose an alternative way of updating scene objects in addition to our current strategy. Essentially, it will let the user build up a Vec<Message> to be passed to the hub in a single large message instead of many small ones. Below is a demonstration of the idea:
Current approach
for object in&objects {
object.set_visible(false);}
This approach works well because it makes for an ergonomic API and is also thread safe; however, it may incur performance penalties for larger applications due to the pointer jumping and atomic operations.
Somehow, I don't expect much of a perf penalty for updates. It would be best to gather some numbers before changing the messaging API in this direction.
When updating scene objects, a small message is passed via a
std::sync::mpsc
channel which is later processed by the hub. This approach works well because it makes for an ergonomic API and is also thread safe; however, it may incur performance penalties for larger applications due to the pointer jumping and atomic operations.I propose an alternative way of updating scene objects in addition to our current strategy. Essentially, it will let the user build up a
Vec<Message>
to be passed to the hub in a single large message instead of many small ones. Below is a demonstration of the idea:Current approach
Proposed alternative approach
The text was updated successfully, but these errors were encountered: