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

Consider using the converters and JsonClassInfo from s_defaultOptions by cloning #32357

Closed
ahsonkhan opened this issue Feb 15, 2020 · 3 comments
Labels
area-System.Text.Json backlog-cleanup-candidate An inactive issue that has been marked for automated closure. tenet-performance Performance related issue
Milestone

Comments

@ahsonkhan
Copy link
Member

internal JsonClassInfo GetOrAddClass(Type classType)
{
_haveTypesBeenCreated = true;
// todo: for performance and reduced instances, consider using the converters and JsonClassInfo from s_defaultOptions by cloning (or reference directly if no changes).
if (!_classes.TryGetValue(classType, out JsonClassInfo? result))
{
result = _classes.GetOrAdd(classType, new JsonClassInfo(classType, this));
}
return result;
}

cc @steveharter

@ahsonkhan ahsonkhan added this to the 5.0 milestone Feb 15, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Feb 15, 2020
@ahsonkhan ahsonkhan removed the untriaged New issue has not been triaged by the area owner label Feb 15, 2020
@steveharter steveharter self-assigned this Jun 25, 2020
@steveharter
Copy link
Member

The comment and a cloning approach is feasible, but moving to Future since it will tie together with memory conservation work planned for Future by #1568

@steveharter steveharter modified the milestones: 5.0.0, Future Aug 4, 2020
@steveharter steveharter removed their assignment Jan 19, 2021
@ghost
Copy link

ghost commented Oct 15, 2021

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of the experimental issue cleanup initiative we are currently trialing in a limited number of areas. Please share any feedback you might have in the linked issue.

@ghost
Copy link

ghost commented Nov 5, 2021

This issue will now be closed since it had been marked no recent activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@ghost ghost closed this as completed Nov 5, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 5, 2021
@eiriktsarpalis eiriktsarpalis added the backlog-cleanup-candidate An inactive issue that has been marked for automated closure. label Feb 18, 2022
@ghost ghost removed the no-recent-activity label Feb 18, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json backlog-cleanup-candidate An inactive issue that has been marked for automated closure. tenet-performance Performance related issue
Projects
None yet
Development

No branches or pull requests

4 participants