Groups | Blog | Home
all groups > dotnet framework > may 2006 >

dotnet framework : CLR keeps on probing for XmlSerializers assembly



Vagif Abilov
5/31/2006 5:32:07 PM
I noticed that components that use XmlSerializer class cause CLR to probe
for XmlSerializers assembly. Is this default behavior, i.e. whenever
component try to serialize/deserialize one of its classes, CLR will search
for pre-compiled serializer? If so, can I simply use SGEN tool to generate
such assembly and CLR will automatically use it? And will it really give a
significant performance advantage?

Thanks in advance
Vagif Abilov
Oslo Norway

Ben Voigt
6/2/2006 10:38:01 AM
[quoted text, click to view]

The cost of generating the serializer is substantial (since Reflection.Emit
is quite heavy-duty), however the ongoing performance should be equal since
I believe it's the same code used for pre-compiling and on-the-fly, and that
the on-the-fly serialization assembly is cached for the lifetime of the
appdomain.

[quoted text, click to view]

Vagif Abilov
6/4/2006 2:31:27 PM
Thanks, so this means once generated it will be kept as long as AppDomain
lives. Then we will probably afford online generation.

Vagif

[quoted text, click to view]

AddThis Social Bookmark Button