Don't use runtime reflection to read from data models (use source generation or IL code instead) #695
Labels
feature
Label Pull requests with new features. Used when generation releasenotes
kind/chore
quality/debt
status/triage
Milestone
Description
Runtime reflection is known to be very slow, and with validation we use lots of it to be able to read properties of dynamic objects. Generated code that looks like this would be way faster
Additional Information
There are two common patterns to generate code in C#
Source Generation
IL generated code
Tasks
json
style accessors for all properties to use in the switch/case (respecting [JsonPropertyName], and supporting recursive types)Acceptance Criterias
Use Source generation or cached IL generated code to access properties in data models using strings.
The text was updated successfully, but these errors were encountered: