|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
CLR keeps on probing for XmlSerializers assemblyI 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 "Vagif Abilov" <va***@online.no> wrote in message The cost of generating the serializer is substantial (since Reflection.Emit news:%23j14kdMhGHA.1320@TK2MSFTNGP04.phx.gbl... >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? 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. Show quote > > Thanks in advance > Vagif Abilov > Oslo Norway > Thanks, so this means once generated it will be kept as long as AppDomain
lives. Then we will probably afford online generation. Vagif Show quote "Ben Voigt" <rbv@nospam.nospam> wrote in message news:uHOsJqlhGHA.4080@TK2MSFTNGP03.phx.gbl... > "Vagif Abilov" <va***@online.no> wrote in message > news:%23j14kdMhGHA.1320@TK2MSFTNGP04.phx.gbl... >>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? > > 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. > >> >> Thanks in advance >> Vagif Abilov >> Oslo Norway >> > > |
|||||||||||||||||||||||