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

Fix DeserializeAsyncEnumerable generic recursion issue. #87276

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

eiriktsarpalis
Copy link
Member

Refactors the DeserializeAsyncEnumerable moving the logic away from JsonTypeInfo<T> and into a static method in JsonSerializer. This should fully address the generic recursion issues we've been seeing creep up in AOT.

System.Text.Json.SourceGeneration.Tests AOT size

main

image

Total accounted size: 106.5 MB

PR branch

image

Total accounted size: 60.6 MB

Contributes to #87078.

@ghost
Copy link

ghost commented Jun 8, 2023

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Refactors the DeserializeAsyncEnumerable moving the logic away from JsonTypeInfo<T> and into a static method in JsonSerializer. This should fully address the generic recursion issues we've been seeing creep up in AOT.

System.Text.Json.SourceGeneration.Tests AOT size

main

image

Total accounted size: 106.5 MB

PR branch

image

Total accounted size: 60.6 MB

Contributes to #87078.

Author: eiriktsarpalis
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@ghost
Copy link

ghost commented Jun 8, 2023

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

Issue Details

Refactors the DeserializeAsyncEnumerable moving the logic away from JsonTypeInfo<T> and into a static method in JsonSerializer. This should fully address the generic recursion issues we've been seeing creep up in AOT.

System.Text.Json.SourceGeneration.Tests AOT size

main

image

Total accounted size: 106.5 MB

PR branch

image

Total accounted size: 60.6 MB

Contributes to #87078.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json, size-reduction

Milestone: 8.0.0

@Sergio0694
Copy link
Contributor

Sergio0694 commented Jun 16, 2023

Updated size diffs for the Microsoft Store (including this and #87211):

System.Text.Json version Package size
7.0.2 69.192 KB
8.0.0-preview.6.23316.2 65.122 KB

Delta: -4.07 MB (-5.88%)

Compared with the previous diffs (#84015 (comment)), which had a delta of -1.698 KB (-2.55%) from 7.0.2, the updated results are incredibly impressive, this is amazing!! Well over twice as much package size size reduction than Preview 5!!! 🎉🎉🎉

Really amazing work @eiriktsarpalis and the whole team! 😄

@ghost ghost locked as resolved and limited conversation to collaborators Jul 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json 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.

3 participants