RE: performance of xml serilisation
- From: scottrm <scottrm@xxxxxxxxxxxxxxxx>
- Date: Tue, 11 Jul 2006 03:38:02 -0700
Hi
Thanks for your reply. From my understanding the first time that I serialize
the objects into the cache there would be a big performance hit but when I
perform subsequent serialization/de-serialization the peformance overhead
would be less, is this correct?
--
Scott
"Steven Cheng[MSFT]" wrote:
Hello Scott,.
Thank you for posting in the MSDN newsgroup.
From your description, you're developing an ASP.NET web application, in
this application, you have some custom class objects and want to persist
them into the ASP.NET cache or session storage, and you'll choose XML
serialized XML data as the persistent mode. Currently you're wondering
whether there is any potential performance issue or recommendation on this,
correct?
Based on my understanding, .net XML Serizliation(XmlSerializer) will
dynamically generate type specific xmlreader/xmlwriter classes for
underlying xml processing. So such dynamic classes's generation(code
generating and compiling) is a big performance overhead, this will occur at
the first time you use xmlserializer to serialize a class. Are you using
ASP.NET 1.X or 2.0? In .net framework 2.0, it provides the sgen.exe tool
which can help pregenerate xml serization classes so as to avoid the
dynamic class genration and compilation at runtime.
#XML Serializer Generator Tool (Sgen.exe)
http://msdn2.microsoft.com/en-us/library/bk3w6240.aspx
In addition, there are some other things we should take care of when
designing our custom classes which will utilize XML Serialization, you can
have a look at the following msdn article for detailed reference:
#How To: Improve Serialization Performance
http://msdn.microsoft.com/library/en-us/dnpag/html/scalenethowto01.asp?frame
=true
Hope this helps you some.
Regards,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
- Follow-Ups:
- RE: performance of xml serilisation
- From: Steven Cheng[MSFT]
- RE: performance of xml serilisation
- References:
- RE: performance of xml serilisation
- From: Steven Cheng[MSFT]
- RE: performance of xml serilisation
- Prev by Date: RE: performance of xml serilisation
- Next by Date: RE: performance of xml serilisation
- Previous by thread: RE: performance of xml serilisation
- Next by thread: RE: performance of xml serilisation
- Index(es):
Relevant Pages
|