DataSet Serialization ?? Remoting ???????? improving

???? ?????? ???? ??????
???? ID: 829740 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

??????

?? ???? ?? ??? .NET Framework ??????????? ??????? ?? ????? ???? ??System.Data.DataSetclasses ?? ?? ????? serialization ???? ???? ?? ?????? serialize ?? ??? deserialize ???? ?? ??? ????????? ???? ??? ?? ?? ?????? ????? ??DataSet?????

???? ???????

?? ?? ??? ???System.Data.DataSet???????? ??????? ???? ??, ?? ??? serialize, ??????? ?? ??? ?? deserialize .NET Framework Remoting ?? ????? ???? ???? ??DataSet????? ??? ???? ??? ???DataSet.NET ??? ????, internally Microsoft .NET Framework ?? ????System.Xml.Serialization.XMLSerializer???? serialize ???? ?? ??? ????? ???? ???? ??DataSet??????? ?? ??? ???? ????? ???? ??? ???? ??? ???DataSet?? COM +, ??? hosted ???????? ???????? ??BinaryFormatterclass is used by .NET Framework Remoting. Regardless of the remoting mechanism that is used by the .NET Framework, theDataSetclass always converts the internal data to XML when serializing the data.

TheDataSetclass that is included with the Microsoft .NET Framework 1.0 and with the .NET Framework 1.1 works efficiently for serializing small amounts of data (hundreds of rows) in theDataSetover .NET Framework Remoting. The serialization mechanism is inefficient with a largerDataSet(thousands of rows) and incurs large transient (short lived) memory allocations. These memory allocations reduce application scalability.

???:???? ?????????? ?????? ????? ?? ??? ?? ??? ???????? ?? ????????? ?? ????? ???? ?? ?? short-lived ?????? ????? ??? ?????, serialization ?? ?????, remoting ?? ????? ?? deserialization ?? ?? ????? ???DataSet????, ???????? ???? ?????????? ?????? ?? remoting ?????? ?? ??????? ???? ?? ??? .NET Framework Remoting ?????? internally deallocated ???? ?????? ?? ??? ?? ??? ???????? ?????????? deallocating .NET ?????? ??????? ?????? ?? ???????? ???? ???? ?? ?? ????? scalability ?? ?? ???? ??? ?????? ?? ???, ?????? ?? in-flight ???? invocations ??? ?????????? ?????? allocations ????? ???? ???? ???? ????????? ??? ???? ?????? ?? ???? ?? ???? ??? ???? ??? ????? ?? ??? ???

?? serialization ?? remoting ???????? ?? ??? ????? ?? ???? ????DataSets?? ?????? ?? ??? ??? ?? ?????? surrogate ?????? ?? serialization ???? ???? ?? ????? ?? ??? ??? .NET Framework ?? ??? ?? surrogate ??????? ?? ???? ??????? (?? ?????) ?? ????? ???? ?? ???? ??? ???? ??????? ?? ???DataSet???? ?? ???, ????? Microsoft ?????? ??????? (MSDN) ??? ???? ?? ????:
HTTP://MSDN.Microsoft.com/msdnmag/issues/02/12/cuttingedge
???????, ?? ???? ?????? ???? ?? ???? ??????????? ???? ?? ??? ??? ????? ????? ??DataSetsurrogate ?????? ?? ???? serialization ???? ?????

?? ???? ??? ?? ????? serialization ???? ???? ?? ???? ?????? serialize ?? ??? deserialize ???? ?? ??? ????????? ???? ??? ??DataSets. ?? ???? ???????????? ???? ?? ??????? remoting ???? ?????????? ?????? allocationsDataSet. Large reductions in the transient memory allocations also improve remoting end-to-end time and improve scalability when using a largerDataSet.

The sample provides a serialization wrapper class that is namedDataSetSurrogate. TheDataSetSurrogateclass is used as a wrapper class for anyDataSetthat you want to remote. The server component passes theDataSetthat you want to theDataSetSurrogateconstructor and then passes theDataSetSurrogateclass back to the client. On the client side, theDataSetSurrogate.ConvertToDataSetmethod is used to extract theDataSet??DataSetSurrogate?????

TheDataSetSurrogateclass is markedSerializableand all the fields in theDataSetSurrogateclass are also serializable classes. Therefore, when you remote theDataSetSurrogate????????, remoting ?????? ???????? ??? ?? serializes ?? deserializesDataSetSurrogate???????? ?? ???? ??? ?????? ??? ????? serialization ??? ??DataSetSurrogate?? ????DataSet???? ?? ??DataSetSurrogate???? serializes ?????? ?????? ??? ???? ??? ???? ?????? ?????? ?? ????? ???? serializing ?? ???? ???? ????? ??? ?????? ?? CPU ?????? ?? ??DataSetXML serialization ???????

???:?? serialization ???? ???? ?? ???????? ??? ?? ??? ???? ?? ??? .NET Framework ?? ????? ????System.Runtime.Serialization.Formatters.Binary.BinaryFormatter?? ???? remoting. .NET Framework ?? ????? ???? remotingSystem.Runtime.Serialization.Formatters.soap.SoapFormatter???? ???? ?? ??? ??? ???? ?? ?? ?? ?? ????? ????DataSetSurrogate?????

????? ????? Microsoft ??????? ?????? ?? ??????? ?? ??? ?????? ??::
?? ??? ?? ??????? ?????? ??? ?? ??????? ????
??????? ????
SurrogateSample.exe ?????? ?? ??????? ?????Microsoft ?????? ??????? ?? ???? ??????? ???? ?? ???? ??? ???? ????? ?? ???, ????? ???? ?????? ?? ????? ?? ???? ?? Microsoft ???????? ??? ?????::
119591?????? ?????? ?? Microsoft ?????? ??????? ???? ??????? ????
Microsoft ????? ?? ??? ?? ????? ?? ????? ?? ??? Microsoft ?? ?? ?????? ?? ?????? ???? ??????? ?????-??? ?????????? ?? ????? ???? ?? ????? ????? ?? ?? ??.. ????? ?? ?? ???????-??????????? ????? ?? ???????? ???? ??? ?? ?? ????? ??? ???? ?? ??????? ???????? ?? ????? ??? ??? ???? ??..

????? ??????? ?? ?????

???? ???????? ?? ?????? C ?? ??? SurrogateSample.exe ????? ??????? ???? ?? ??????? ?????? ????? ???? ???? ???????? ?????? ?????? ???????? ????????? ??? ?? readme ????? ???

???

???? ID: 829740 - ????? ???????: 05 ?????? 2010 - ??????: 4.0
???? ???? ???? ??:
  • Microsoft .NET Framework 1.0
  • Microsoft .NET Framework 1.1
??????: 
kbdownload kbinfo kbmt KB829740 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:829740

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com