A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dotnet/runtime/issues/36130 below:

Improve the performance of configuration binding · Issue #36130 · dotnet/runtime · GitHub

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4