XML vs Binary performance for Serialization/Deserialization

前端 未结 6 1858
迷失自我
迷失自我 2020-12-10 15:03

I\'m working on a compact framework application and need to boost performance. The app currently works offline by serializing objects to XML and storing them in a database.

6条回答
  •  甜味超标
    2020-12-10 16:03

    The main expense in your method is the actual generation of the XmlSerializer class. Creating the serialiser is a time consuming process which you should only do once for each object type. Try caching the serialisers and see if that improves performance at all.

    Following this advice I saw a large performance improvement in my app which allowed me to continute to use XML serialisation.

    Hope this helps.

提交回复
热议问题