dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.95k stars 4.65k forks source link

Move reflection invocation in coreclr to fully managed way #100696

Open janvorli opened 5 months ago

janvorli commented 5 months ago

Currently, the first invocation of a method via reflection goes via a native code path using the RuntimeMethodHandle::InvokeMethod and the following invocations use dynamically generated managed code. The usage of the native code path is there to improve startup time. However, we can mitigate the startup time impact by precompiling reflection invocation stubs to a few dozen most common signatures. Then we can get rid of the native code path completely.

dotnet-policy-service[bot] commented 5 months ago

Tagging subscribers to this area: @dotnet/area-system-reflection See info in area-owners.md if you want to be subscribed.

buyaa-n commented 1 month ago

@janvorli is this still planned for 9.0?