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

Avoid boxing struct during serialization #32147

Closed
steveharter opened this issue Feb 11, 2020 · 0 comments · Fixed by #32669
Closed

Avoid boxing struct during serialization #32147

steveharter opened this issue Feb 11, 2020 · 0 comments · Fixed by #32669
Assignees
Labels
Milestone

Comments

@steveharter
Copy link
Member

steveharter commented Feb 11, 2020

As part of #2259, we deferred fixing an issue that causes an extra box+unbox when a struct is serialized. This adds ~32-40 bytes of allocation plus slows the execution.

Expect:

  • No boxing occurs for simple value structs (a single-value struct with no properties; just a custom value type). Note boxing occurs here in 3.0\3.1 as well (a single box+unbox), so we will improve on that in 5.0 by removing it.
  • A single box+unbox for "POCO structs" where the struct has properties that are serialized. Currently we have 2. This is a regression from 3.0\3.1 where we only had 1.
@steveharter steveharter added this to the 5.0 milestone Feb 11, 2020
@steveharter steveharter self-assigned this Feb 11, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 11, 2020
@ahsonkhan ahsonkhan removed the untriaged New issue has not been triaged by the area owner label Feb 12, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants