Closed jacksunny2020 closed 1 year ago
Hello Jack,
Thank you for the PR! Unfortunately, it contains a breaking change. Removing FindBranch() invocation in case of mismatching Union schemas would make common scenarios fail. Ex:
The Resolve
The FindBranch() under the if statement is taking a negligible amount of time, compared to the whole deserialization process. When you are using the same model as for serialization, it's nearly 0.
The most promising fields of improvements are the most used places. In your case, it would be ResolveRecord(), ResolveArray(), and ResolveDictionary() methods. You might want to take a look at them for possible time gain.
Thank you for your input! Adrian
Hi Adrian,
Bottleneck is method Resolve in our project. The suggestion of refactor based on analysis on the source code. Here is the unit test result after this change.
Best Regards, Jack