Answered by:
Binary Serialization

Question
-
Hi,I'm using binary serialization (custom serialization) to send my objects over the wire (UDP). The object size can be 4MB or larger and it seems to be taking around 1500ms to serialize and deserialize this payload.Is 4MB or greater to large a size to send or can I tweak the performance of the binary serializer somehow?ThanksWednesday, September 16, 2009 3:23 PM
Answers
-
I seriously doubt this bottleneck comes from BinaryFormatter. Serialize to a MemoryStream to proof the point.
Hans Passant.- Proposed as answer by Michael Sun [MSFT]Microsoft employee Wednesday, September 30, 2009 1:15 AM
Wednesday, September 16, 2009 5:44 PM -
Hi,
In addition to nobugz’s point, you can use CLR Profiler to check the where is the bottleneck.
Additional references about CLR Profiler and serialization performance:
http://msdn.microsoft.com/en-us/library/ms979205.aspxhttp://blogs.msdn.com/jmstall/archive/2005/12/17/CLR-profiler-2-0-available.aspx
http://www.microsoft.com/downloads/details.aspx?familyid=8A2E454D-F30E-4E72-B531-75384A0F1C47&displaylang=enhttp://msdn.microsoft.com/en-us/library/ms979193.aspx
Hope you have a nice day!
Best Regards,
Lingzhi Sun
MSDN Subscriber Support in ForumIf you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed as answer by Michael Sun [MSFT]Microsoft employee Wednesday, September 30, 2009 1:15 AM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Friday, October 2, 2009 11:31 AM
Thursday, September 17, 2009 2:17 AM
All replies
-
4MB+ is pretty big. Considering you can get this serialized, transferred up via UDP, and deserialized in 1.5 seconds I think your doing ok.
おろ?Wednesday, September 16, 2009 3:27 PM -
I seriously doubt this bottleneck comes from BinaryFormatter. Serialize to a MemoryStream to proof the point.
Hans Passant.- Proposed as answer by Michael Sun [MSFT]Microsoft employee Wednesday, September 30, 2009 1:15 AM
Wednesday, September 16, 2009 5:44 PM -
Hi,
In addition to nobugz’s point, you can use CLR Profiler to check the where is the bottleneck.
Additional references about CLR Profiler and serialization performance:
http://msdn.microsoft.com/en-us/library/ms979205.aspxhttp://blogs.msdn.com/jmstall/archive/2005/12/17/CLR-profiler-2-0-available.aspx
http://www.microsoft.com/downloads/details.aspx?familyid=8A2E454D-F30E-4E72-B531-75384A0F1C47&displaylang=enhttp://msdn.microsoft.com/en-us/library/ms979193.aspx
Hope you have a nice day!
Best Regards,
Lingzhi Sun
MSDN Subscriber Support in ForumIf you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed as answer by Michael Sun [MSFT]Microsoft employee Wednesday, September 30, 2009 1:15 AM
- Marked as answer by Michael Sun [MSFT]Microsoft employee Friday, October 2, 2009 11:31 AM
Thursday, September 17, 2009 2:17 AM -
Hi,
I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?
If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.
Have a nice day!
Best Regards,
Lingzhi SunMSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.Monday, September 21, 2009 9:32 AM