[Uri] Consider caching PathAndQuery #34618
Labels
area-System.Net
enhancement
Product code improvement that does NOT require public API changes/additions
tenet-performance
Performance related issue
Milestone
Uri caches several results that are likely to be accessed again. It doesn't do so for Uri.PathAndQuery, but this property is used on every request made by SocketsHttpHandler. We should consider caching it, for scenarios where the same Url is used repeatedly with an HttpClient. As with any caching, though, we'd want to make sure it was actually worthwhile and didn't negatively impact other important cases.
cc: @scalablecory, @MihaZupan
The text was updated successfully, but these errors were encountered: