I want to use your Factory extension so I profiled your project and found several inefficient code places changing which could really improve performance:
1/ FuncProvider.Create should cache result of
functionFactory.GetMethodInfo(genericArguments.Length).MakeGenericMethod(genericArguments)
with static ConcurrentDictionary or alternatives.
2/ FuncProvider.Create should use cached Reflection.Emit-ed method to do Invoke instead of plain reflection.
3/ FunctionFactory.GetMethodInfo should cache its results.
I want to use your
Factoryextension so I profiled your project and found several inefficient code places changing which could really improve performance:1/
FuncProvider.Createshould cache result ofwith static ConcurrentDictionary or alternatives.
2/
FuncProvider.Createshould use cachedReflection.Emit-ed method to doInvokeinstead of plain reflection.3/
FunctionFactory.GetMethodInfoshould cache its results.