Uh oh!
There was an error while loading. Please reload this page.
Use emit-based invoke for all of WASM including DI - #85065
Conversation
ghost
commented
Apr 19, 2023
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsMakes the newer emit-based reflection added to Mono in .NET 8.0 also support Blazor\WASM. (perf numbers to come in a bit). Also addresses main requirement for #66153 which is to allow ASP.NET to use DI's
|
ghost
commented
Apr 19, 2023
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsMakes the newer emit-based reflection added to Mono in .NET 8.0 also support Blazor\WASM. (perf numbers to come in a bit). Also addresses main requirement for #66153 which is to allow ASP.NET to use DI's
|
ghost
commented
Apr 19, 2023
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsMakes the newer emit-based reflection added to Mono in .NET 8.0 also support Blazor\WASM. (perf numbers to come in a bit). Also addresses main requirement for #66153 which is to allow ASP.NET to use DI's
|
ghost
commented
Apr 19, 2023
Tagging subscribers to 'arch-android': @steveisok, @akoeplinger Issue DetailsMakes the newer emit-based reflection added to Mono in .NET 8.0 also support Blazor\WASM. (perf numbers to come in a bit). Also addresses main requirement for #66153 which is to allow ASP.NET to use DI's
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
buyaa-n
left a comment
There was a problem hiding this comment.
LGTM, the comment here was helpful for understanding better
Makes the newer emit-based reflection added to Mono in .NET 8.0 also support Blazor\WASM.
Also addresses main requirement for #66153 which is to allow ASP.NET to use DI's
ActivatorUtilities.CreateFactorywithout a ~259K size regression (measuring size of .br files).The perf results for using an emit-based invoke instead of interpreted are not as good as the 2x-3x we saw for Core and Mono, but the expected overall improvement should be ~20-30% with the largest gain by far being a zero-arg constructor which is ~2.2x faster. Once the new fast invoke APIs are ready (which are based on emit), those are expected to further improve most cases; these will be used by DI once available.
Measurements below are in ms and for 1,000,000 iterations. Also includes the
object[] parametersalloc forMethodBase.Invoke()for cases that have parameters.