locked
Isolated Storage and Serialization RRS feed

  • Question

  • Hi All,

    Is it performance wise correct to store data in isolated storage after serialization or should I save it without serialization ? The problem I feel with Serialization may be that when I wish to update a single record in List I will have to fetch all the records update the sing record and then serialize it and then save it. Please correct me if I am making any silly mistake understanding these ?

    Thanks,
     Nilesh
    Thursday, January 27, 2011 7:38 PM

Answers

  • Finally used a SQlite wrapper. Please reply to this thread if anyone needs the link for it. Sorry forgot what is the exact link

    Saturday, February 26, 2011 7:10 PM

All replies

  • It's hard to give you a definitive answer given that there's nothing known about the characteristics of the data that you are working with. But here's some info.

    store data in isolated storage after serialization or should I save it without serialization ?

    If you are saving it to a file then it's in a serialized form. Whether by XmlSerialization, the DataContractSerializer, or your own custom solution your data has gone through some something to change the object graph to a serialized form. In other words there is no saving without serialization. Simply put serialization is the conversion of your object graph into a form that is appropriate for transmission over a stream (that stream may be attached to a file, network connection, or something else). You might need to explain what you mean by "without serialization" in other terms. 

    The problem I feel with Serialization may be that when I wish to update a single record in List I will have to fetch all the records update the sing record and then serialize it and then save it.

    You do, and there is a cost associated with that. But if you are working with a small amount of data you may just be able to ignore the cost. If you are working with a large amount of data then you can partition it across several files. If you make a change that needs to be persisted then the cost is potentially lower if that change requires changes to a subset of those files. 

    Thursday, January 27, 2011 7:51 PM
  • Finally used a SQlite wrapper. Please reply to this thread if anyone needs the link for it. Sorry forgot what is the exact link

    Saturday, February 26, 2011 7:10 PM