views:

67

answers:

3

Hi,

I heard an example at work of using serialization to serialise some values for a webpart (which come from class properties), as this improves performance (than I assume getting values/etting values from/to database). I know it is not possible to get an explanation of how performance in the scenario I speak of at work can be improved as there is not enough information, but is there any explanation of how serialization can generally improve performance?

Thanks

+1  A: 

Serialization never improves performance over directly passing and manipulating objects. It is just a mechanism to transfer objects in some interoperable format (not always necessary to be interoperable).

Darin Dimitrov
A: 

Plain serialization won't improve performance because you're introducing overhead for serializing/deserializing your objects. However, if you're talking performance of transmitting data over the network, serializing your data and compressing the serialized object can improve that.

Anna Lear
A: 

Serialising a webpart and saving it to a single database field might improve performance slightly, but probably not. It would definately add the cost of not being able to query for a webpart using anything other than a keyed field. Serialisation is more commonly used for sending data between components.

Daniel Dyson