On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter <b...@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.

If we want better performance, we should go a step further and overload the 
readAllLines method in the Reader implementation class.

For example, in the most commonly used InputStreamReader, overload readAllLines 
through StreamDecoder and make special optimizations for UTF8/ISO_8859_1 
encoding.

In StringReader, special overload methods can also be used for optimization.

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

PR Comment: https://git.openjdk.org/jdk/pull/25863#issuecomment-2983379522

Reply via email to