Open Ez2Raven opened 3 years ago
Performance profiling on a trivial implementation for processing SNMP json structures:
For a flat object with 3 properties, locating the last element
Deserialize Json string to C# Object for post processing = 110ms Parse Json String to JsonDocument and process each element = 40ms
In terms of performance, we should choose to work with JsonDocument instead of C# Object. However, working with C# Object also means that we have flexibility to work with other data structure such as Binary and XML.
For now, I will migrate to C# object processing until there's a need to tune performance.
Migrate Newtonsoft.JSON to System.Json for better performance.
Restructure code to let controller layer handle Json Serialization/deserialization.