Skip to content
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

Consider using .SizeOpt.cs in System.Linq built for Browser/Xamarin/AOT #45399

Closed
stephentoub opened this issue Dec 1, 2020 · 2 comments · Fixed by #47918
Closed

Consider using .SizeOpt.cs in System.Linq built for Browser/Xamarin/AOT #45399

stephentoub opened this issue Dec 1, 2020 · 2 comments · Fixed by #47918
Labels
area-System.Linq size-reduction Issues impacting final app size primary for size sensitive workloads
Milestone

Comments

@stephentoub
Copy link
Member

stephentoub commented Dec 1, 2020

We previously added the *.SizeOpt.cs set of implementations for System.Linq.dll in order to cull out some generics-heavy optimizations that were adding significant overhead (often megabytes of asm in an app) to AOT compilations using LINQ. However, it also adds non-trivial IL size, e.g. a .dll built with the SpeedOpt files is currently ~128K whereas one built with the SizeOpt files is currently ~102K (both sizes are untrimmed).

For target frameworks where size is at a premium, we should consider using these .SizeOpt variants instead.

For AOT builds, we should also look to use these SizeOpt variants.

And if we're not going to use them in either, we should delete them and clean up the cruft. (We also should revisit a few specific optimizations, in particular the ToArray implementation that uses a complicated and large "LargeArrayBuilder", which is likely not worth its weight.)

cc: @marek-safar, @eerhardt

@stephentoub stephentoub added the linkable-framework Issues associated with delivering a linker friendly framework label Dec 1, 2020
@stephentoub stephentoub added this to the 6.0.0 milestone Dec 1, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 1, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

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.

@ghost
Copy link

ghost commented Dec 1, 2020

Tagging subscribers to this area: @eiriktsarpalis, @jeffhandley
See info in area-owners.md if you want to be subscribed.

Issue Details

We previously added the *.SizeOpt.cs set of implementations for System.Linq.dll in order to cull out some generics-heavy optimizations that were adding significant overhead (often megabytes of asm in an app) to AOT compilations using LINQ. However, it also adds non-trivial IL size, e.g. a .dll built with the SpeedOpt files is currently ~128K whereas one built with the SizeOpt files is currently ~102K.

For target frameworks where size is at a premium, we should consider using these .SizeOpt variants instead.

For AOT builds, we should also look to use these SizeOpt variants.

And if we're not going to use them in either, we should delete them and clean up the cruft. (We also should revisit a few specific optimizations, in particular the ToArray implementation that uses a complicated and large "LargeArrayBuilder", which is likely not worth its weight.)

cc: @marek-safar, @eerhardt

Author: stephentoub
Assignees: -
Labels:

area-System.Linq, linkable-framework, untriaged

Milestone: 6.0.0

@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Dec 1, 2020
@marek-safar marek-safar changed the title Consider using .SizeOpt.cs in System.Linq built for Browser/Xamarin Consider using .SizeOpt.cs in System.Linq built for Browser/Xamarin/AOT Dec 1, 2020
@marek-safar marek-safar added size-reduction Issues impacting final app size primary for size sensitive workloads and removed linkable-framework Issues associated with delivering a linker friendly framework labels Dec 9, 2020
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 5, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Linq size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants