RE: performance of xml serilisation

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thanks for your quick response Scott,

Yes, you're right, after the first type the type specific dynamic
serialization assemblies are generated, they'll be cached and reused for
sequential serialization/deserialziation processing. As you can see the
"XmlSerializer" class's construct has a parameter of "System.Type" type,
this parameter is used for providing the class type we would like to
perform xml serialization/deserialization on. And another useage of this
parameter is that the .net runtime will use the type's FullName(maybe
assembly Qualified name) as the Key to cache it.

In addition, such serialization assemblies(dynamic generated and compiled)
are based .net AppDomain scope, that means each appdomain will has its own
dynamic assembly cache. As for ASP.NET application, each application is
associated with an AppDomain, that means whenever the application restart
for some reason, the cache is invalid also and the next time any xml
serialization/deserialization request on a certain type(after application
restarted) will result in new dynamic assembly generation.

Hope this also helps. Please feel free to let me know if there is still
anything we can help.

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.)

.



Relevant Pages

  • Re: Strong Name vs Serializable vs Remoting
    ... > strongly named a few assemblies. ... > With a strong name applied to my serializable library, serialization fails ... > chain on the server and I cannot reference a non-strong named assembly. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Tactics for Debugging Custom Components with CodeDom Serialized State
    ... >I am not sure if you used the CodeDOM serialization correct, and if CodeDOM serialization is the correct solution for serializing your objects. ... They appear in the Task List window below the design surface as "Build Errors". ... considers the two assemblies to be different, ... >When the exception throws out, in the debugger call stack window, we can get the list of exception call stack. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Weird XML serialization problem
    ... I am experiencing a *very* frustrating problem with XML serialization. ... Everything works - all of my assemblies that reference ... Exception Information ...
    (microsoft.public.dotnet.framework)
  • Re: Problem with serializing business object instead of core objec
    ... do this since the server does not need to know the type of object I am ... > server assembly and once in the client assembly. ... > client and server assemblies. ... >> an object instead of allowing the framework to handle the serialization so ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Remoting, AppDomains, and Exceptions
    ... double serialization of the Exception. ... Make the server assembly available to the main AppDomain (but I'm sure ... > independant assemblies which expose methods to the client. ... > The Exception object has to pass through 2 serialization rounds. ...
    (microsoft.public.dotnet.framework.remoting)