-
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
Default Uri constructors brings a lot of dependencies #50359
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar, @tannergooding, @CoffeeFlux Issue DetailsUsing a simple program like using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(new Uri ("www.microsoft.com"));
}
} shows that the default Uri constructor brings a lot for size-optimized setup. The size increase for adding Uri constructor is about 80 KB which seems to be a lot for a simple "default" constructor call.
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsUsing a simple program like using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(new Uri ("www.microsoft.com"));
}
} shows that the default Uri constructor brings a lot for size-optimized setup. The size increase for adding Uri constructor is about 80 KB which seems to be a lot for a simple "default" constructor call.
|
cc: @eerhardt |
It's not clear that this is a problem -- do we have a graph of which dependencies it brings in that we think would be reasonable to remove (i.e. not typically used alongside |
The latter - we're trying to identify promising candidates for further reduction, and 80K is a lot to bring in for just that constructor. Ideally someone more familiar with the area would take a look at the dependency graph, and I would assume there is a somewhat linker-unfriendly design that we might want to re-evaluate for size-optimized scenarios. See #44534 for a similar example |
Can you provide the dependency graph? |
I normally use ILSpy to look at this, though I think there's a linker tool for it as well? cc: @marek-safar See #44534 (comment) on how to generate the assemblies |
Triage: Per discussion with @marek-safar does not seem critical for 6.0, moving to Future from Networking point of view. |
Using a simple program like
shows that the default Uri constructor brings a lot for size-optimized setup. The size increase for adding Uri constructor is about 80 KB which seems to be a lot for a simple "default" constructor call.
The text was updated successfully, but these errors were encountered: