- This topic has 10 replies, 2 voices, and was last updated 10 years, 11 months ago by Anonymous.
-
AuthorPosts
-
December 31, 2013 at 15:04 #1365AnonymousInactive
Hi,
I’m currently testing your product, it’s very easy to use. But I’m experiencing very high memory allocation that I first noticed in the task manager looking at peeks of 700MB usage.
It’s basically serialization LZ.BinTree.Create and LZMA.LZ.OutWindow.Create methods that allocate a lot of memory according to my profiling sessions. In my test span it allocates more than 10GB compared to no significant allocation when I switch to WCF over TCP. I’m not doing heavy work but a simple duplex communication channel. How can I disable the compression to test passing only byte arrays?
There is also a larger memory footprint than WCF. Is there tweaks?
Regards,
David
December 31, 2013 at 15:09 #1366AnonymousInactiveWelcome 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.
Regards,
MarcJanuary 3, 2014 at 08:53 #1372AnonymousInactiveThanks for your response.
When I use the SendReceiveOptions as you mentioned I receive null references. I really to test this asap as it would be a burden to have such high memory pressure for such simple objects.
January 3, 2014 at 14:21 #1373AnonymousInactiveHeya David,
I will help however I can. What version are you using and can you give me a full stack trace of the null reference exception?
Regards,
MarcJanuary 6, 2014 at 09:31 #1375AnonymousInactiveHi Marc,
I meant that the PacketHandlerCallBackDelegate’s incomingObject is null. I don’t experience a NullReferenceException.
Regards,
David
January 6, 2014 at 11:08 #1376AnonymousInactiveMorning David,
The following would help:
1. What are you sending when you receive a null as the incoming Object?
2. Is it reproducible?
3. Could confirm the exact send receive options you are using.
4. What version of networkcomms.net are you using?Kind regards,
MarcJanuary 6, 2014 at 12:08 #1377AnonymousInactiveHi Marc,
You’re right I should have provided all that. Let me try to reproduce in a test project. I’m sending ProtoContracts and primitives. I’m using the latest version.
Regards,
David
January 6, 2014 at 14:47 #1378AnonymousInactiveSpeaking with other developers you may be seeing a bug in v2.3.0. We fixed this in v2.3.1. I’m just putting together the download now, so it should be available within the next couple of hours.
Marc
January 6, 2014 at 15:24 #1383AnonymousInactiveVersion 2.3.1 is now available in the download section. If you are able to reproduce the problem using 2.3.0 and moving to 2.3.1 fixes the problem please let us know.
Regards,
MarcJanuary 7, 2014 at 15:51 #1391AnonymousInactiveHi Marc,
The bug is fixed.
Using no compression stopped the high memory pressure and is now inexistant. Also, the memory footprint of simply loading the library is much lighter. The difference is very surprising.
Regards,
David
-
AuthorPosts
- You must be logged in to reply to this topic.