RFR: 8358533: Improve performance of java.io.Reader.readAllLines [v5]

Brian Burkhalter bpb at openjdk.org
Thu Jun 26 22:43:59 UTC 2025


On Tue, 24 Jun 2025 19:15:38 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> > One possibility is to copy the remaining fragment of a line to a new transfer buffer (maybe twice the size).
> 
> It's probably worth testing this.

In 0ee3f59 I implemented something like this. It is a bit faster than the currect proposal and dispenses with `StringBuilder`. The test is expanded for better coverage.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25863#discussion_r2170163998


More information about the core-libs-dev mailing list