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

Add opt-in for converters to handle null #35826

Merged
merged 11 commits into from
May 8, 2020

Conversation

layomia
Copy link
Contributor

@layomia layomia commented May 5, 2020

Fixes #34439.

@layomia layomia added this to the 5.0 milestone May 5, 2020
@layomia layomia requested review from steveharter and jozkee May 5, 2020 04:31
@layomia layomia requested a review from ahsonkhan as a code owner May 5, 2020 04:31
@layomia layomia self-assigned this May 5, 2020
@ghost
Copy link

ghost commented May 5, 2020

Tagging subscribers to this area: @jozkee
Notify danmosemsft if you want to be subscribed.

@Dotnet-GitSync-Bot
Copy link
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@layomia
Copy link
Contributor Author

layomia commented May 5, 2020

This change does not regress existing benchmarks.

dotnet run --base "D:\benchmarks\handle_null\before" --diff "D:\benchmarks\handle_null\after" --threshold 3%
summary:
better: 1, geomean: 1.061
worse: 2, geomean: 1.036
total diff: 3
Slower diff/base Base Median (ns) Diff Median (ns) Modality
System.Text.Json.Serialization.Tests.WriteJson.Serial 1.04 692.62 717.90
System.Text.Json.Serialization.Tests.WriteJson.Seria 1.04 349.66 362.06
Faster base/diff Base Median (ns) Diff Median (ns) Modality
System.Text.Json.Serialization.Tests.WriteJson.SerializeToString 1.06 410.06 386.40

before.zip
after.zip

@layomia layomia merged commit 7949ab8 into dotnet:master May 8, 2020
@layomia layomia deleted the converter_handle_null branch May 8, 2020 17:56
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide opt-in for custom converters to handle null
5 participants