-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Reduce number of runtime assemblies that a typical app has to load #2138
Comments
cc @ericstj |
Wouldn't this cause a potential conflict with |
I expect that it will be a noise at the end. It will reduce number of tiny files that survive and make the few files bigger. Note that most of the tiny facades that this is about are used by every reasonable app, so the chances that the linker was able to remove them are pretty low. The default for |
System.Collections is actually somewhat large: 324 KB. @jkotas you had this in wave 2 originally. Are you concerned about growth of working set? I see that the console template doesn't normally use System.Collections, but MVC does. I didn't check all the templates. I tend to agree that most apps probably use this. I wonder if we could get data on this to back up that claim. 🤔 An alternative, more piecemeal solution here would be to push down all types that are implemented in S.P.C to System.Runtime. Then change these partial facades into plain assemblies referencing System.Runtime. We could then decide case-by-case about moving types down based on tradeoffs to size vs usage. |
Compare this to S.P.CoreLib size that is 10MB. The profile-guided layout for S.P.CoreLib is a must-have to split these 10MB into what is actually used and get a decent working set. These extra 300kB from System.Collections would just get for a free ride. |
* Delete unnecessary netstandard builds and NuGet packages of inbox components - Delete netstandard builds and NuGet packages for System.Reflection.Emit.* - Delete netstandard builds and NuGet packages for System.Reflection.TypeExtensions - Delete netstandard build for System.Buffers\ref - Delete clrcompression UAP build support Contributes to #2138 * Remove packages from the baseline
@jkotas I assume no more work is planned here for 5.0. Moving to Future |
- Makes RuntimeInformation.ProcessArchitecture a JIT/AOT-time constant (constant returning property) - Eliminates tiny netcoreapp assembly with just a few types Fixes dotnet#57152 Contributes to dotnet#2138
For histroric reasons, .NET Core runtime has many small facades and partial facades that do not serve any meaninful purpose anymore. We should consider merging some of them to reduce number of assemlies that a typical app has to load. Unfortunately, we cannot delete them because of backward compatibility.
Example of merged facade looks like: System.AppContext. Notice that ref has type-forwards only and src has no implementation files.
List of proposed merges:
Merge into System.Private.CoreLib\src:
Merge into System.Runtime\ref:
Misc other cleanup
Wave 2: It is less obvious that the merging is a good idea for these (big enough, platform specific, etc.) We may still do some merging for them, based on the experience from the Wave 1 above:
The text was updated successfully, but these errors were encountered: