RFR: 8314774: Optimize URLEncoder
Glavo
duke at openjdk.org
Wed Aug 23 17:06:24 UTC 2023
On Wed, 23 Aug 2023 07:22:59 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
> Hello Glavo, for changes like these, I think it would be more productive and useful to create a mailing list discussion first to provide some context on why this change is needed and gathering inputs from people familiar with this code on whether this change is necessary and worth it. Such discussions will then give the Reviewers some context and inputs on what needs to be considered in these changes and to what extent the changes should be done in the code.
I see. Thank you for your suggestion.
> I don't have enough experience of this class to know if it's worth doing this amount of change for any kind of performance improvements which may not be visible outside of micro benchmarks.
I know it's usually not a performance bottleneck, so the main goal of this PR is to reduce temporary object allocations.
I noticed that this method is called quite frequently in our code, and it is also used in popular frameworks such as spring. I want to minimize GC pressure by minimizing unnecessary temporary objects.
Since that method almost always uses UTF-8, I think it's worth providing a fast path for UTF-8. If it is too difficult to review, then I will try to optimize it in other ways.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15354#issuecomment-1690322671
More information about the net-dev
mailing list