On Wed, 13 Jan 2021 13:48:40 GMT, Claes Redestad <redes...@openjdk.org> wrote:
>> Сергей Цыпанов has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> commits since the last revision: >> >> - Merge branch 'master' into enc >> - 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset) - >> small JavaDoc fix >> - Merge branch 'master' into enc >> - Merge branch 'master' into enc >> - Improve URLEncoder.encode(String, Charset) > > Looks good. > > I wonder... `CharArrayWriter` is an old and synchronized data structure, and > since the instance used here isn't shared that synchronization seem useless. > And since you're now bypassing the `char[]` and going straight for a `String` > you might get better performance with a `StringBuilder` here? (`setLength(0)` > instead of `reset()`...) @cl4es done ------------- PR: https://git.openjdk.java.net/jdk/pull/1598