Groups | Blog | Home
all groups > dotnet remoting > may 2005 >

dotnet remoting : Problem Using-Dataset Serialization Using DatasetSurrogate from KB 829740


HankD
5/4/2005 12:14:46 PM
I have a simple remoting setup that returns a dataset. I decided to try
to improve my performance by using the DatasetSurrogate class from
http://support.microsoft.com/default.aspx?scid=kb;en-us;829740 The
results was the time to retrieve 11,000 rows nearly tripled. I am
assuming I have done something wrong. The code still works but the
performance is awful. I am wondering if it is because I am using
Inherits MarshalByRefObject. Thanks a lot for any help.

Here is my setup.

My remoting object is hosted in IIS so I am using the HTTP channel with
the BINARY formatter.

My client code is something like this-
***********************************************************

Private afwlookupBOL As Ifire_bol.Ifw_lookup_BOL =
CType(remoting_BOL.GetObject(GetType(Ifire_bol.Ifw_lookup_BOL)),
Ifire_bol.Ifw_lookup_BOL) <--Uses Ingo Rammer's Helper Class

Dim dss As DataSetSurrogate.DataSetSurrogate
dss = afwlookupBOL.GetResults(aSelectStatement)
dsResults = dss.ConvertToDataSet()

My remoted object is something like this-
************************************************************
Public Class fw_lookup_BOL
Inherits MarshalByRefObject
Implements Ifire_bol.Ifw_lookup_BOL

Public Function GetResults(ByVal strSQL As String) As
DataSetSurrogate.DataSetSurrogate Implements
Ifire_bol.Ifw_lookup_BOL.GetResults

Dim aOLEDAL As New fire_dal.OleDAL
Dim ds As DataSet
ds = aOLEDAL.dsOLE(strSQL, fire_con.constants.cnTypes.FMINWEB)
Dim dss As DataSetSurrogate.DataSetSurrogate
dss = New DataSetSurrogate.DataSetSurrogate(ds)
GetResults = dss
' Return
End Function
Henry Willsun
5/5/2005 12:00:00 AM
Hi,
look at these articles
http://www.genuinechannels.com/Content.aspx?id=24&type=1
http://www.genuinechannels.com/Content.aspx?id=96&type=1

I hope this will help.

Henry


[quoted text, click to view]

Beth Massi [Architect MVP]
5/5/2005 11:20:51 AM
How are you testing it? Are you testing it on the same machine or are you
testing it, say, across the internet? The time it takes to create the binary
representation of the dataset will definately increase, but the gain is
going to be in the amount of traffic on the wire.. this is going to be very
small. Therefore you are going to see an increase in time if you are testing
all on one machine but a big decrease in time if you are passing accross a
congested network or the internet. This is because the application latency
will increase (the time it takes to create the serialization data) but the
network latency will decrease substantially.

Also, for an update on the DatasetSurrogate (bug fixes and time zone
support) take a look here:
http://bethmassi.blogspot.com/2004/12/binary-serialization-of-datasets.html

HTH,
-B

[quoted text, click to view]

HankD
5/6/2005 10:02:56 AM
Thanks for the followup and after digging deeper I found exactly what
you are talking about. I am not testing on the same machine but inside
the same lan. I noticed that the acutal build time of the serialized
dataset was about 97% of the overall time it took to return to the
client. While with a standard dataset the build time was about 75% of
the total time.

Thanks again for the info.
AddThis Social Bookmark Button