RFR: 8358533: Improve performance of java.io.Reader.readAllLines [v7]
Brian Burkhalter
bpb at openjdk.org
Fri Jun 27 17:32:25 UTC 2025
> 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.
Brian Burkhalter has updated the pull request incrementally with two additional commits since the last revision:
- 8358533: Use a boolean instead of fragPos != -1
- 8358533: Immediately skip LF right after CR
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25863/files
- new: https://git.openjdk.org/jdk/pull/25863/files/ab959dfc..d416ec79
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25863&range=06
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25863&range=05-06
Stats: 23 lines in 1 file changed: 10 ins; 4 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/25863.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25863/head:pull/25863
PR: https://git.openjdk.org/jdk/pull/25863
More information about the core-libs-dev
mailing list