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
Code comments indicate that this is to prevent a race condition, but it has the (probably) unintended consequence of making it impossible to send multiple universes destined for one frame with this method.
In my tests of sending 24 universes, this call causes the overhead to balloon to 30ms. Removing this call (I did not happen to experience the race but of course that does not mean it does not exist) dropped the overhead to 0ms.
A method does not currently exist (although it could be implemented) to call m_ss->RunOnce() only once and then send multiple universes after that would solve this issue.
The use of m_ss->RunOnce() to prevent a race is made unclear by the fact that the corresponding API for OlaClientCore::SendDMX() (called by OlaClient::SendDMX()) does not make the same call to m_ss->RunOnce() :
When called without any callback settings, it makes the same exact call to m_stub->StreamDmxData() as found in StreamingClientbut without calling RunOnce().
A key difference is that this function is a returns a void and not a bool, but it is still able to check if the socket is open prior to calling m_stub->StreamDmxData() by checking m_connected.
OK, I have updated the example to allow you to test StreamingClient and OlaClientWrapper side by side with the -a flag. The difference in delay between the two APIs is confirmed: DaAwesomeP@2140930
I'm not really sure @DaAwesomeP . I've asked in #1792 but not had clarification yet. I suspect that sort of timescale should be okay, I've still got a bit of faffing to do for some final bits too.
Hello!
This is a continuation of the discussion here: https://groups.google.com/g/open-lighting/c/6yBsDBnpANU
There are two related issues:
StreamingClient::SendDMX()
contains a delay in the form ofm_ss->RunOnce()
:ola/ola/StreamingClient.cpp
Lines 141 to 168 in 9604d48
m_ss->RunOnce()
only once and then send multiple universes after that would solve this issue.m_ss->RunOnce()
to prevent a race is made unclear by the fact that the corresponding API forOlaClientCore::SendDMX()
(called byOlaClient::SendDMX()
) does not make the same call tom_ss->RunOnce()
:ola/ola/OlaClientCore.cpp
Lines 469 to 496 in 9604d48
m_stub->StreamDmxData()
as found inStreamingClient
but without callingRunOnce()
.void
and not abool
, but it is still able to check if the socket is open prior to callingm_stub->StreamDmxData()
by checkingm_connected
.cc @nomis52 @peternewman
The text was updated successfully, but these errors were encountered: