Reputation: 21
I have a problem with the deserialization with serviceStack.Text. The running Time of the serialization of a complex object increases exponentially with increasing complexity of the object . In particular, this object contains a list of simple objects , increasing the number of these items in the list , the time of serialization increases dramatically . how do I make it faster ?
These are my only configuration:
JsConfig.IncludeTypeInfo = true;
JsConfig.IncludePublicFields = true;
Upvotes: 2
Views: 175
Reputation: 143374
I'd highly recommend against using:
JsConfig.IncludeTypeInfo = true;
Which forces unnecessary type information to be included which unnecessarily bloats the payload. Ideally your DTO's should be well-defined and not contain unknown object or Interface properties which increases serializer-specific coupling and will fail to serialize in many standards-based serializers.
Upvotes: 1