This question came to my head while working with a map in silverlight that displays some harbours, and after mouse_overing the harbour, its data gets displayed in the screen. I did it and now it works, using WCF service, but I get some big delays. My friend told me that maybe Json could handle better with this delay, but I have no idea. What should I do?
+1
A:
Are you doing WCF with binary encoding (custom binding) instead of XML (basichttpbinding)? That could save a lot of time.
http://www.mostlydevelopers.com/blog/post/2009/10/14/Silverlight-3-WCF-Binary-Message-Encoding.aspx
Otherwise, json could be faster but I think the conversion must be done in last option. You certainly can (must) optimize either Server or Client code. For example : Are you returning only the needed Data or a whole object fully populated with list of childs you don't care?
Benjamin Baumann
2010-09-27 16:51:45
I'm returning just the objects I need, using basichttpbinding, and just useful data.
Bruno
2010-09-27 17:21:01
Ok so you can try binary binding. It typically speeds up by 30% your communications. I looked for a JSon vs SOAP in wcf performance comparison and I think it really depends on your data. I would still go with WCF and binaries (more straightforward and easier to serialize) because your bandwith is not so important. If you did mobile developement I would recommend json though.
Benjamin Baumann
2010-09-27 22:41:11