-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The call time of the static ProxyGenerator's CreateClassProxyType method is gradually increasing. #486
Comments
Assuming that your benchmark method gives sufficiently accurate results, I am curious how they would change if you...
The first of these would tell us if there has been a performance regression in .NET Core 3.1 reflection. Either of the last two might tell us if the degrading perf has to do with the fact that later types' metadata is placed further back in the IL metadata tables (which might matter if reflection does lots of linear table scans). This is admittedly a wild guess, but would be interesting to know. |
hi @stakx
But the result is still that the execution time of the static 10 controllers can let us see the growth trend.
|
I've run some tests by wrapping various DynamicProxy code segments with For example, this line of code which calls If you look at the types you're proxying, you'll notice that they have a ton of methods. The base class I don't think there's much we can do here. Without knowing your usage scenario in detail, I would suggest that you check whether it is truly necessary to create |
@stakx Thanks for your guidance 👍 I will try another way to avoid the above problems. |
Castle.Core version 4.4.0
I have a lot of mvc controllers for net core 3.1(netcoreapp3.1).
But the result of
static ProxyGenerator
and creating anew ProxyGenerator
is different.The call time of the static ProxyGenerator's
CreateClassProxyType
method is gradually increasing.Console output:
The text was updated successfully, but these errors were encountered: