You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenarios that use typeof(System.Object) are significantly slower since:
During serialization, the object's type is obtained and a dictionary lookup is performed to obtain the correct "converter". The dictionary lookup is expensive. It is possible to improve the caching here, especially when serializing a collection of objects where all elements are the same Type.
During deserialization, the converter for System.Object creates a JsonElement to represent the object. For primitive types like boolean, the cost is high. It is possible to improve performance here by avoiding extra array pool allocations that are created and then released via Dispose(), so going from this:
Scenarios that use
typeof(System.Object)
are significantly slower since:System.Object
creates aJsonElement
to represent the object. For primitive types like boolean, the cost is high. It is possible to improve performance here by avoiding extra array pool allocations that are created and then released via Dispose(), so going from this:to
The text was updated successfully, but these errors were encountered: