Performance Issue when serializing large ADO RecordSets in ASP.NET  
Author Message
Dwight Kulkarni





PostPosted: ASMX Web Services and XML Serialization, Performance Issue when serializing large ADO RecordSets in ASP.NET Top

Hi,

We are serializing an ADO recordset whose size is about 8 MB. The query to retrieve the ADO recordset take 2 seconds. But the act of serializing the recordset into XML is taking 130 seconds. Below is the code we are using. We would like to know if there is a better way to convert an ADO recordset to a serializable string.

private string RsToString(ADODB.Recordset rsIN) {< XML:NAMESPACE PREFIX = O />

            if (rsIN != null)

            {    Stream streamObj = new Stream();

                rsIN.Save(streamObj, PersistFormatEnum.adPersistXML);

                // Get the string (XML) of the recordset

                string xmlRS = streamObj.ReadText(streamObj.Size);

                return xmlRS;

            }

            else

                return null;

        }

Thanks.

Dwight




.NET Development25  
 
 
Dwight Kulkarni





PostPosted: ASMX Web Services and XML Serialization, Performance Issue when serializing large ADO RecordSets in ASP.NET Top

Hello,

I was exploring one possibility. Instead of serializing the ADO Recordset to XML string, I was thinking of serializing it as a binary stream and recreating the exact stream on the client side. My question is what are effects and risks of this method across processors and different Windows versions in the context of exchanging closed/static ADO Recordsets.

Thank you.

 

Dwight