Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Claes Redestad
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Eirik Bjørsnøs
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Lance Andersen
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Eirik Bjørsnøs
> Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" > against a directory entry "name/" (with

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Claes Redestad
On Wed, 11 Sep 2024 08:34:09 GMT, Eirik Bjørsnøs wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 681: >> >>> 679: >>> 680: e.flag = CENFLG(cen, pos); >>> 681: e.method = CENHOW(cen, pos); >> >> Not reading `nlen` when it's not needed is a good change, and

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 19:39:34 GMT, Claes Redestad wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add whitespace per review feedback > > src/java.base/share/classes/java/util/zip/ZipFile.java line 681: > >> 679:

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 19:39:24 GMT, Lance Andersen wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add whitespace per review feedback > > src/java.base/share/classes/java/util/zip/ZipCoder.java line 161: > >> 159:

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 19:57:56 GMT, Claes Redestad wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add whitespace per review feedback > > src/java.base/share/classes/java/util/zip/ZipFile.java line 549: > >> 547:

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 19:34:11 GMT, Claes Redestad wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add whitespace per review feedback > > src/java.base/share/classes/java/util/zip/ZipCoder.java line 161: > >> 159:

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 19:30:52 GMT, Lance Andersen wrote: > If this does not make a huge performance difference, I would keep this > together with the init of elen and clen on line 692. I verified this does not cause a regression, so moved the `nlen` read up on the common path. See also my comm

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v4]

2024-09-11 Thread Eirik Bjørsnøs
> Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" > against a directory entry "name/" (with

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v3]

2024-09-11 Thread Eirik Bjørsnøs
> Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" > against a directory entry "name/" (with

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v2]

2024-09-11 Thread Eirik Bjørsnøs
> Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" > against a directory entry "name/" (with

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Lance Andersen
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Eirik Bjørsnøs
Please review this PR which speeds up `ZipFile.getZipEntry` by removing slash-checking logic which is already taking place during lookup in `ZipFile.Source.getEntryPos`. `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" against a directory entry "name/" (with a trailing