RFR: 8358533: Improve performance of java.io.Reader.readAllLines
Brian Burkhalter
bpb at openjdk.org
Tue Jun 24 14:42:57 UTC 2025
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Replaces the implementation `readAllCharsAsString().lines().toList()` with reading into a temporary `char` array which is then processed to detect line terminators and copy non-terminating characters into strings which are added to the list.
The commit [d5abfa4](https://github.com/openjdk/jdk/pull/25863/commits/d5abfa450cb3fcd604560833038735e41952bce9) does not address most comments provided to date. The algorithm was wrong and I preferred to correct it first.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25863#issuecomment-3000783598
More information about the core-libs-dev
mailing list