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 optimizing DependencyContextJsonReader for netstandard2.0 by avoiding string allocations. #3422

Open
ahsonkhan opened this issue Jan 23, 2019 · 0 comments
Labels
area-DependencyModel enhancement Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@ahsonkhan
Copy link
Member

Based on feedback from dotnet/core-setup#5009 (comment).

For netstandard2.0, we are consuming the new System.Text.Json library (as sources). This allows us to avoid (or at least defer) allocations by giving us access to the underlying slice of the data that contains the relevant JSON. Therefore, avoid calls to GetString() where possible and compare spans directly until the relevant JSON string is found (and only then materialize it as a string).

cc @eerhardt, @stephentoub

@msftgits msftgits transferred this issue from dotnet/core-setup Jan 30, 2020
@msftgits msftgits added this to the Future milestone Jan 30, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@eerhardt eerhardt removed the untriaged New issue has not been triaged by the area owner label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DependencyModel enhancement Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests

4 participants