RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL

2021-01-20 Thread eirbjo
By moving string splitting and concatenation into the canonizeString utility, we can defer allocation until we determine that canonization is required. This saves two string allocations and a string concat for the common case where canonization is not required. As a refactoring, move ParseUtil.

Re: RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL [v2]

2021-01-20 Thread eirbjo
; As a refactoring, move ParseUtil.canonizeString/doCanonize into Handler since > that's the only call site. > > Finally, let's rename the method to canonizalizeString, since canonization is > an rather unrelated term. eirbjo has updated the pull request incrementally wi

Re: RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL [v2]

2021-01-20 Thread eirbjo
On Wed, 20 Jan 2021 15:32:13 GMT, Claes Redestad wrote: >> eirbjo has updated the pull request incrementally with one additional commit >> since the last revision: >> >> As a part of the rename from "canonize" to "canonicalize", doCanonize >>

Re: RFR: 8260043: Reduce allocation in sun.net.www.protocol.jar.Handler.parseURL [v2]

2021-01-20 Thread eirbjo
On Wed, 20 Jan 2021 15:34:21 GMT, Claes Redestad wrote: >> eirbjo has updated the pull request incrementally with one additional commit >> since the last revision: >> >> As a part of the rename from "canonize" to "canonicalize", doCanonize >>