We have an application with objects that we would like to store in the database.
We are currently using the NetDataContractSerializer , but we recently found out that, due to the .Net information associated with it, it creates huge files, which means a slow application, even for basic objects.
We plan to upgrade to the DataContractSerializer instead, and I was looking for a good comparison of the two, but could not find.
- What is the difference in size between the objects created by the two?
- Is there a big difference in performance?
- Is any of them problematic when I have an object containing
List<X> , where X inherited by several other objects, so that the list contains many different types at runtime? (I was told that DataContractSerializer attributes can be set to KnownTypes , but that means more dependencies in the code. Is there a way to make the DataContractSerializer know all that types in my solution?)
Thanks.
Noich
source share