Is WcfProxy 30 times slower then RemotingProxy?

Is WcfProxy 30 times slower then RemotingProxy?

Old forum URL: forums.lhotka.net/forums/t/7090.aspx


Cuong posted on Friday, June 12, 2009

I am converting my old WindowsForm app to Silverlight. Both are client/server app and run on IIS. The WindowsForm app uses the RemotingProxy and it needs only about 6 seconds to transfer data of 10MB between clients and server. The Silverlight app uses WcfProxy and needs about 180 seconds to transfer the same data. Both apps (include clients and server) run on the same machines. Is WcfProxy 30 times slower then RemotingProxy or did I config something wrong?

ixman replied on Friday, June 12, 2009

Hi,

Check the binding... It must be WSHttpBinding... and is slow... Do you need security or encryption?If not, disable them. If you don't have a problem with opening a TCP port in your firewall use NetTcpBinding, is almost as fast as remoting.

Regards,

esaulsberry replied on Friday, June 12, 2009

ixman:
Hi, Check the binding... It must be WSHttpBinding... and is slow... Do you need security or encryption?If not, disable them. If you don't have a problem with opening a TCP port in your firewall use NetTcpBinding, is almost as fast as remoting. Regards,

Alas, Silverlight only supports Basic HTTP binding.

Cuong replied on Friday, June 12, 2009

My app does not need security or encryption. I only need some ways to improve data transferring in Silverlight app. Could you instruct me the way to disable security and encryption features of WcfProxy.

In fact I am using CompressedProxy in Silverlight app and it consumes 180s for transferring data of 10MB. This proxy is good for transferring business objects. But for raw data as my case, I see the speed is not improved much.

RockfordLhotka replied on Saturday, June 13, 2009

Wait, are you saying you are trying to use the data portal to transfer 10MB of raw data?

Don't do that!! Really!!

The Silverlight data portal is designed to move business objects between Silverlight and .NET. To make this possible we had to do a lot of work around serializing and encoding object data, and I don't think that can be avoided when dealing with object graphs. In other words the overhead is required and unavoidable.

But you must realize that serialization incurs overhead that is not necessary for raw data, and it seems silly to incur that overhead when you don't need to.

Just set up another WCF service on your web/app server, define your own data contract for your raw data, and transfer the data directly through WCF, not through the data portal.

skagen00 replied on Friday, June 12, 2009

You absolutely have to use compression. Are you using compression? If not, I'll dig up a link for you.

Paul Czywczynski replied on Friday, June 12, 2009

We are using a custom formatter and compression.

http://www.noemax.com/products/fastinfoset/index.html

If anyone has anymore ideas to tweak more speed out of WCF I am all ears.

-Paul

sergeyb replied on Friday, June 12, 2009

I do not believe this product will work well with CSLA for Silverlight because the message is already in binary format by the time it gets to WCF, so this product will not give you much.  You can use Fiddler to confirm this.  You can also find an example of Silverlight compression for CSLA under samples in SVN.  It is using CSharpZipLib.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Paul Czywczynski [mailto:cslanet@lhotka.net]
Sent: Friday, June 12, 2009 12:28 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] Is WcfProxy 30 times slower then RemotingProxy?

 

We are using a custom formatter and compression.

http://www.noemax.com/products/fastinfoset/index.html

If anyone has anymore ideas to tweak more speed out of WCF I am all ears.

-Paul



Copyright (c) Marimer LLC