-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
area-Extensions-Configurationfeature-requesttenet-performancePerformance related issuePerformance related issue
Milestone
Description
Is your feature request related to a problem? Please describe.
I have a configuration class which contains over 50 properties. I want to get the new configuration for each request so IOptionsSnapshot is my choice, but the problem is that configuration is using Reflection to bind the options for each request. And for obvious reasons it can't be cached like IOptions or IOptionsMonitor.
Also breaking the configuration class to multiple class is not an option here.
Describe the solution you'd like
Is it good idea to create a method using ILGenerator at runtime and use that to bind the configuration class? I assume once the method is created it has better performance than reflection.
P.S. I'm willing to create a PR for this.
shaynevanasperen, TechnoBerry, Dzliera, hammypants, teneko and 3 more
Metadata
Metadata
Assignees
Labels
area-Extensions-Configurationfeature-requesttenet-performancePerformance related issuePerformance related issue