Home Forums Support High memory allocation Reply To: High memory allocation


Welcome to our forums and many thanks for your interest in our network library.

As you have found most memory allocations come from the compression/decompression stages. Disabling compression is straight forward to do globally, just change NetworkComms.DefaultSendReceiveOptions:

NetworkComms.DefaultSendReceiveOptions = new SendReceiveOptions<ProtobufSerializer>();

If you only intend to used pure byte[] then you can go a step further an also disable the serialisation stages (there is a very small additional overhead to sending byte[] if the serialisation stage is enabled):

NetworkComms.DefaultSendReceiveOptions = new SendReceiveOptions<NullSerializer>();

For more info please see our tutorial on SendReceiveOptions here.