Open Svisstack opened 3 years ago
NetMQ Version: 4.0.1.6 Operating System: Windows .NET Version: .NET 5.0
Have a possibility to not allocate on the GC or have a reasonable workaround to eliminate allocations on the GC.
Visible allocations in the NetMQ.Core.Transports.ByteArraySegment from https://github.com/zeromq/netmq/blob/master/src/NetMQ/Core/Transports/V2Decoder.cs#L85
Run Pub -> Sub pattern and profile the Subscriber.
Looking for ideas why this is happening and how this could be fixed.
ByteArraySegment could probably be a readonly struct with a little refactoring.
ByteArraySegment
readonly struct
Environment
Expected behaviour
Have a possibility to not allocate on the GC or have a reasonable workaround to eliminate allocations on the GC.
Actual behaviour
Visible allocations in the NetMQ.Core.Transports.ByteArraySegment from https://github.com/zeromq/netmq/blob/master/src/NetMQ/Core/Transports/V2Decoder.cs#L85
Steps to reproduce the behaviour
Run Pub -> Sub pattern and profile the Subscriber.
Looking for ideas why this is happening and how this could be fixed.