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
After profiling a project which made heavy use of this library (~70 sender/receiver nodes in total) we identified the following hot spots regarding memory allocation:
MatchAddress - string splitting and MessagePattern construction adds up. Can the split be deferred until we indeed have a match? Can the message pattern be cached?
PadNull - If I understand it correctly OSC requires byte blobs and strings to be 4 byte aligned? In that case allocating the memory with the proper size would be more beneficial.
Unpack -> UnpackMessage and UnpackString. Both can be done more efficient using Span.
Attached is a screenshot from the profiler
The text was updated successfully, but these errors were encountered:
azeno
added a commit
to azeno/VL.IO.OSC
that referenced
this issue
Feb 21, 2021
- UnpackMessage and UnpackString use Span
- MessagePattern.IsMatch now static method based on span as well. Will only allocate if regex is indeed used.
- Use more memory friendly value tuple in OSCServer
After profiling a project which made heavy use of this library (~70 sender/receiver nodes in total) we identified the following hot spots regarding memory allocation:
DatagramSender
->Socket.SendToAsync
, not much we can do about it except wait, see Proposal: Zero allocation connectionless sockets dotnet/runtime#30797MatchAddress
- string splitting andMessagePattern
construction adds up. Can the split be deferred until we indeed have a match? Can the message pattern be cached?PadNull
- If I understand it correctly OSC requires byte blobs and strings to be 4 byte aligned? In that case allocating the memory with the proper size would be more beneficial.Unpack
->UnpackMessage
andUnpackString
. Both can be done more efficient usingSpan
.Attached is a screenshot from the profiler
The text was updated successfully, but these errors were encountered: