Groups | Blog | Home
all groups > dotnet distributed apps > january 2006 >

dotnet distributed apps : DataSet is fast. MarshalByRef objects - slow


oleksa
1/24/2006 8:54:40 AM
Hello.

I've wrote some simple tests to test performance. In the client and
server configuration files binary forrmaters were set up.
For 10000 objects datasets passed by values are 8 or sometimes even 10
times faseter then reading marshalled by reference objects properties.
Why? How marshal by ref objects performance could be increased?
There is no need to pass such huge amount of data between client and
application server of course. But I beleive that the same performance
difference will be kept with 1000 objects.

Thank you.
Michael Nemtsev
1/25/2006 12:00:00 AM
Hello oleksa,

Could you show your code?

o> Hello.
o>
o> I've wrote some simple tests to test performance. In the client and
o> server configuration files binary forrmaters were set up.
o> For 10000 objects datasets passed by values are 8 or sometimes even
o> 10
o> times faseter then reading marshalled by reference objects
o> properties.
o> Why? How marshal by ref objects performance could be increased?
o> There is no need to pass such huge amount of data between client and
o> application server of course. But I beleive that the same performance
o> difference will be kept with 1000 objects.
o>
o> Thank you.
o>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch

oleksa
1/25/2006 12:40:27 AM
As you wish <http://gzip.rsdn.ru/File/35065/DIvsRef.zip> VS 2005, RSDN
Framework library were used in the solution and was included in the
archive.

There are several methods on the client side that will perform some
tests.

WARNING! I suggest to decrease
client.Program.objectSize
constant to 5000 or even 1000 objects. You will wait too long otherwise
because it is set to 30000 now in the code.

TestReference will get IIDTitle and IData object references one by one
from application server and then enumerate its properties. The slowest
method.

TestReferenceListGeneric will get IList<IIDTitle> and IList<IData> from
server and enumerate each object property the same manner as the
previous. Passing list is fast but object property enumeration is too
slow as in the previous method.

TestDataSet will ask service to create the same amount of objects as
the previous methods but objects will be created on the server and
converted to the two data tables in the data set. Than data set will be
passed to the client and enumerated. DataSet
serialization/deserialization and passing over network is very fast. I
think that it will be faster to convert server objects to the data set,
pass it to the client and restore objects from dataset records on the
client will be much faster than passing objects by reference or by
value.

TestDataItems and TestDataItemListGeneric was wrote to test object by
value remoting performance. Those methods are commented out now in the
client code. Data and IDTitle objefcts are converted to the DataItem
objects (data transfer object) and passed to the client.
oleksa
1/25/2006 1:15:31 AM
One more warning - log files will be wrote on d: logical drive. You
should perform context replace if there is no d: drive at your computer.
AddThis Social Bookmark Button