You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to optimize:
Write to char[] and then use XmlWriter.WriteChars(...). This should eliminate all temporary string for int/DateTime/guid.... types, which should be majority when serializing custom types. This change will help us later to use XmlSerializationWriter.WriteTypedPrimitive method in XmlSerializationWriterILGen instead of again creating strings and using XmlConvert.ToString(...)
The text was updated successfully, but these errors were encountered:
Description
Possible optimization found.
Current implementation of writing primitive types fallbacks to string using XmlConvert.ToString(..).
runtime/src/libraries/System.Private.Xml/src/System/Xml/Serialization/XmlSerializationWriter.cs
Line 247 in 5c8aade
Regression?
No
Analysis
How to optimize:
Write to char[] and then use XmlWriter.WriteChars(...). This should eliminate all temporary string for int/DateTime/guid.... types, which should be majority when serializing custom types. This change will help us later to use XmlSerializationWriter.WriteTypedPrimitive method in XmlSerializationWriterILGen instead of again creating strings and using XmlConvert.ToString(...)
The text was updated successfully, but these errors were encountered: