-
uWebSockets_App.publish( example This can be really useful for performance aswell if it will be coded in uWebSockets core, because at the moment in order to do such thing, you have to make an array containing all of the connections and update them through that array, by using .find() or something similiar. That's just a suggestion that could be a perofrmance beast! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The purpose of publish is to publish messages over the affected connections. If you want to change values to objects that is out of scope and does not belong in that function. You don't need to solve it the way you propose, you can easily solve it in O(log n) or even O(1) by using smarter algorithms in your coding. It doesn't belong in this library. |
Beta Was this translation helpful? Give feedback.
The purpose of publish is to publish messages over the affected connections. If you want to change values to objects that is out of scope and does not belong in that function.
You don't need to solve it the way you propose, you can easily solve it in O(log n) or even O(1) by using smarter algorithms in your coding. It doesn't belong in this library.