Skip to content

Debloat serialization guard - #89706

Merged
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:debloat
Aug 2, 2023
Merged

Debloat serialization guard#89706
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:debloat

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
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`).
Fixesdotnet#87470.
@MichalStrehovskyMichalStrehovsky added area-Serialization size-reduction Issues impacting final app size primary for size sensitive workloads labels Jul 31, 2023
@ghost

Copy link
Copy Markdown

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:-

@jkotasjkotas left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

cc @GrabYourPitchforks

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Serializationsize-reductionIssues 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

@MichalStrehovsky@jkotas