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

Brian Burkhalter bpb at openjdk.org
Tue Jul 1 23:04:01 UTC 2025


On Tue, 1 Jul 2025 19:17:17 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> With this change
>> 
>> --- a/test/jdk/java/io/Reader/ReadAll.java
>> +++ b/test/jdk/java/io/Reader/ReadAll.java
>> @@ -115,6 +115,8 @@ public static void setup() throws IOException {
>>              sb.setLength(0);
>>          }
>>  
>> +        strings.add(" ".repeat(Integer.MAX_VALUE/2));
>> +
>> 
>> the limit is reached but it doubles the test run time, at least on an M4 Max.
>
> Yea, seems a waste to run it every time. I don't think we run any tests statistically *some of the time".
> Maybe if it was limited to run only in *big* configurations, maybe a separate @run with:
> 
> `@requires os.maxMemory >= 6g`

The test fails with OOME in the CI even with the above `@requires` so I am _not_ changing it for now.

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

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


More information about the core-libs-dev mailing list