Uh oh!
There was an error while loading. Please reload this page.
Split TryGetGenericMethodComponents into two overloads - #84156
Conversation
Resolvesdotnet#83069. Hello World is now 1.45 MB, down from 1.65 MB. Half of the callers don't care about the `MethodNameAndSignature` part - don't spend time computing it. This also allows trimming `MethodNameAndSignature` from a hello world, which allows trimming pretty much all of the type loader.
ghost
commented
Mar 31, 2023
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsResolves #83069. Hello World is now 1.45 MB, down from 1.65 MB. Half of the callers don't care about the This also allows trimming
|
MichalStrehovsky
commented
Mar 31, 2023
Hm, we still have the type loader on Linux. At least two reasons:
|
MichalStrehovsky
commented
Mar 31, 2023
Ah, nope. We could still be in some shared code and the MdArray handle was template-type-loaded. So we might need to template-type-load the SzArray. We'll have to live with this. I'll update the Linux baseline size to not expect the template type loader saving. |
jkotas
commented
Mar 31, 2023
We can teach the JIT to use a different JIT helper for MD arrays that have rank 2 or more. The JIT helper for this case would not have this dependency. |
jkotas
commented
Mar 31, 2023
We can fix this one by calling FastAllocateString directly. We are calling FastAllocateString directly in System.Globalization in number of places, so one more is not a big deal. |
MichalStrehovsky
commented
Mar 31, 2023
I was afraid you would suggest this :).
Another alternative would be delaying making the delegate targets reflectable: #82607 (comment). But |
MdArray rank1 with all-zero lower bounds gets actually allocated as an SzArray. On Native AOT this means we need to spin up to the type loader to potentially load the new type. Split this expensive (and impossible-to-express-in-C#) thing into a separate helper so we can trim the type loader. dotnet#84156 (comment)
A delegate with a ValueTuple over a reference type triggers generation of type loader data structures to load arbitrary ValueTuples over reference types at runtime. The replacement is a lot less expensive. dotnet#84156 (comment)
A delegate with a ValueTuple over a reference type triggers generation of type loader data structures to load arbitrary ValueTuples over reference types at runtime. The replacement is a lot less expensive. #84156 (comment)
MdArray rank1 with all-zero lower bounds gets actually allocated as an SzArray. On Native AOT this means we need to spin up to the type loader to potentially load the new type. Split this expensive (and impossible-to-express-in-C#) thing into a separate helper so we can trim the type loader. #84156 (comment)

Resolves#83069. Hello World is now 1.45 MB, down from 1.65 MB.
Half of the callers don't care about the
MethodNameAndSignaturepart - don't spend time computing it.This also allows trimming
MethodNameAndSignaturefrom a hello world, which allows trimming pretty much all of the type loader.Cc @dotnet/ilc-contrib