Re: RFR: JDK-8301621: libzip should use pread instead of lseek+read

2023-02-06 Thread Justin King
On Sun, 5 Feb 2023 19:04:24 GMT, Alan Bateman wrote: > Are you planning to include benchmark results to go with this change? > > It should be okay to change readFullyAt to use pread, and ReadFile with an OV > with the position. The latter has a side effect that it changes the file > pointer bu

Re: RFR: JDK-8301621: libzip should use pread instead of lseek+read

2023-02-06 Thread Vyom Tewari
On Fri, 3 Feb 2023 19:49:44 GMT, Justin King wrote: > Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the > same thing by using `OVERLAPPED`, as we are in synchronous mode we can use > `Offset` and `OffsetHigh` to achieve the same thing. > > Additionally I updated open

Re: RFR: JDK-8301621: libzip should use pread instead of lseek+read

2023-02-05 Thread Alan Bateman
On Fri, 3 Feb 2023 19:49:44 GMT, Justin King wrote: > Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the > same thing by using `OVERLAPPED`, as we are in synchronous mode we can use > `Offset` and `OffsetHigh` to achieve the same thing. > > Additionally I updated open

RFR: JDK-8301621: libzip should use pread instead of lseek+read

2023-02-03 Thread Justin King
Avoid using `lseek` + `read` in favor of `pread`. For Windows, we can do the same thing by using `OVERLAPPED`, as we are in synchronous mode we can use `Offset` and `OffsetHigh` to achieve the same thing. Additionally I updated open to use `O_CLOEXEC` when available, as that really should be us