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

Debloat serialization guard #89706

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

MichalStrehovsky
Copy link
Member

Use UnsafeAccessor instead of a delegate.

Shrinks the size of a PublishAot app that just Process.Starts a new process from 2.2 MB to 1.7 MB. It's still half a MB bigger than what I would expect but now it's Process's fault (the ToString() brings some serious amount of garbage and we can't practically trim ToString).

Fixes #87470.

Use `UnsafeAccessor` instead of a delegate.

Shrinks the size of a `PublishAot` app that just `Process.Start`s a new process from 2.2 MB to 1.7 MB. It's still half a MB bigger than what I would expect but now it's `Process`'s fault (the `ToString()` brings some serious amount of garbage and we can't practically trim `ToString`).

Fixes dotnet#87470.
@MichalStrehovsky MichalStrehovsky added area-Serialization size-reduction Issues impacting final app size primary for size sensitive workloads labels Jul 31, 2023
@ghost
Copy link

ghost commented Jul 31, 2023

Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar
See info in area-owners.md if you want to be subscribed.

Issue Details

Use UnsafeAccessor instead of a delegate.

Shrinks the size of a PublishAot app that just Process.Starts a new process from 2.2 MB to 1.7 MB. It's still half a MB bigger than what I would expect but now it's Process's fault (the ToString() brings some serious amount of garbage and we can't practically trim ToString).

Fixes #87470.

Author: MichalStrehovsky
Assignees: -
Labels:

area-Serialization, size-reduction

Milestone: -

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@jkotas
Copy link
Member

jkotas commented Jul 31, 2023

cc @GrabYourPitchforks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Serialization size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SerializationGuard bloats the binary size on NAOT
2 participants