This has been discussed a few times. The bmost expensive operation is the
initial instantiation of an XmlSerializer for a certain type, make sure you
design around that. Check the archives [0] for more on that topic.
--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor
[0]
http://groups.google.com
"Tomasz Kaszuba" <tomasz.kaszuba@N!O!inteligoS!P!A!M.pl> wrote in message
news:OIFKC#GTDHA.212@TK2MSFTNGP10.phx.gbl...[color=blue]
> I'm at a quandry as to what's the best/fastest way to deserialize an
> incoming xml stream?
>
> I ran a small test on xmlserializer and on a small file it performed 10
> times worse then when I used the XMLDocument and deserialized the values
> myself. Is the xmlserializer really that slow?
>
> I'm expecting a file about 1 MB in length and if it's that slow on a 2 K
> file then I can't phantom how it's going to behave on a 1 MB file.
>
> Should I just skip the xmlserializer and XML Dom and go straight to
> xmlreader and do the deserialization myself?
>
>[/color]