Consider optimizing DependencyContextJsonReader for netstandard2.0 by avoiding string allocations. #3422
Labels
area-DependencyModel
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
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
The text was updated successfully, but these errors were encountered: