Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Daniel Fuchs
Looks good to me Rahul! best regards, -- daniel On 27/08/2020 19:14, Rahul Yadav wrote: Thank you all for the feedback. I have included feedback and updated webrev. Before : Benchmark  Mode  Cnt    Score    Error Units ThreadLocalURI.uriDecoderBaseline  avgt   25  55

Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Alan Bateman
On 27/08/2020 19:14, Rahul Yadav wrote: Thank you all for the feedback. I have included feedback and updated webrev. Before : Benchmark  Mode  Cnt    Score    Error Units ThreadLocalURI.uriDecoderBaseline  avgt   25  556.315 ± 23.389 ns/op ThreadLocalURI.uriDecoderTest 

Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Rahul Yadav
Thank you all for the feedback. I have included feedback and updated webrev. Before : Benchmark  Mode  Cnt    Score    Error Units ThreadLocalURI.uriDecoderBaseline  avgt   25  556.315 ± 23.389 ns/op ThreadLocalURI.uriDecoderTest  avgt   25  728.413 ± 19.833 ns/op Th

Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Daniel Fuchs
Hi Rahul, The code changes look good to me but the uriDecoderTest needs some working. The reason is that the decoded path is cached in the URI, so only the first call to getPath() will decode it. The following calls will just return the cached value. I also believe you should remove the inner lo

Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Claes Redestad
On 2020-08-27 16:11, Alan Bateman wrote: For the micro, I'm curious if iterations is needed. I'd say the canonical JMH way of doing these might be something as simple as this: @Benchmark public URI encodeURI() throws URISyntaxException { return new URI("http", "\u00A0", "\u

Re: RFR 8245308 : Replace ThreadLocalCoders decoder/encoder cache in java.net.URI

2020-08-27 Thread Alan Bateman
On 27/08/2020 14:11, Rahul Yadav wrote: Hello, Request to have my fix reviewed for issue: JDK-8245308:  Replace ThreadLocalCoders decoder/encoder cache in java.net.URI. This fix updates java.net.URI, replaces the ThreadLocalCoders optimization. The benchmark results indicate no impact, opti