I am working on a project in which a Silverlight 4 client calls a WCF web service that returns a large amount of data. Some profiling has shown that
the actual execution of the webservice method takes less than one second (calls another server / generates a very large data set / etc., it is already quite optimized)
data transfer depends on the network, but, as a rule, is not a problem - it can receive everything that it needs.
the time between the client receives an http response (I see it as completed in Fiddler) and the Completed event raised in the Silverlight client: ~ 15 seconds (there is no difference between IE / firefox / chrome)
I believe the 15 second delay is pretty much spent on deserialization.
My binding uses HttpTransport and BinaryMessageEncoding , with gzip compression on top of it. Gzip compression does not seem to affect performance: the difference between the lack of compression and the maximum compression level is virtually nonexistent. The http response is ~ 15 Mb without compression and ~ 400 kb is compressed (a lot of overhead even with binary XML!)
Note: the web service is completely ad hoc, I am not interested in interoperability and complete freedom of protocol choice.
The obvious solution would be to transfer less data, but introducing swapping will require significant architectural changes that are not currently in progress. Reducing the data set is also quite difficult, because the solution is completely customizable by the end user, and, as you know, users do not always know what they are doing and create huge queries.
I stayed with the wcf binding: this project started with SL 2 and developed through SL 3 and SL 4, so maybe I am missing some faster binding introduced in Silverlight 4. Is there an even faster encoder (or binding ) that I can use to avoid the deserialization bottleneck on the client?
source share