On Thu, 30 May 2024 19:48:25 GMT, Naoto Sato wrote:
>> There is an initialization code in `Console` class that searches for the
>> Console implementations. Refactoring the init code not to use lambda/stream
>> would reduce the (initial) number of loaded classes by about 100 for
>> java.base im
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implementations. This would become relevant when the java.io
On Thu, 30 May 2024 18:38:59 GMT, Pavel Rappo wrote:
>> In fact, this started simply for incorporating JLine implementation into
>> Console, and using ServiceLoader was a mere means to load its impl as it
>> resides outside the java.base module. So yes, module and its console
>> implementation
On Thu, 30 May 2024 18:10:14 GMT, Naoto Sato wrote:
>> Claes has described the issue well. Like I said, `break` short-circuits the
>> search. If a module can provide more than one console provider, the
>> suggested stream-less replacement is **not** equivalent.
>>
>> If a module can provide mo
On Thu, 30 May 2024 08:23:25 GMT, Pavel Rappo wrote:
>> It's only semantically the same if we assume a module can only provide a
>> single `JdkConsoleProvider`, no? The `break;` disallows multiple providers
>> (for disjoint sets of charsets) in a single module.
>
> Claes has described the issue
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote:
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implem
On Thu, 30 May 2024 10:02:25 GMT, Alan Bateman wrote:
> Would it be possible to provide more context/background here? This is not
> code that is used during startup. Is there benchmark data to share for first
> use of java.io.IO ?
I think this was brought to the fore by https://openjdk.org/jep
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote:
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implem
On Thu, 30 May 2024 07:44:24 GMT, Claes Redestad wrote:
>> Right. Since `findAny` is after the module name matching, there is at most 1
>> match. In the case we didn't find any, the final `orElse(null)` eventually
>> returns null. So the refactored code is semantically the same.
>
> It's only s
On Wed, 29 May 2024 22:25:09 GMT, Naoto Sato wrote:
>> Yes, `break` guarantees that the search completes one way or another once
>> the module name has been matched. This is not how it used to be done.
>
> Right. Since `findAny` is after the module name matching, there is at most 1
> match. In
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote:
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implem
On Wed, 29 May 2024 21:39:37 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/java/io/Console.java line 673:
>>
>>> 671: return new ProxyingConsole(jc);
>>> 672: }
>>> 673: break;
>>
>> Suggestion:
>>
On Wed, 29 May 2024 21:27:30 GMT, Chen Liang wrote:
>> There is an initialization code in `Console` class that searches for the
>> Console implementations. Refactoring the init code not to use lambda/stream
>> would reduce the (initial) number of loaded classes by about 100 for
>> java.base im
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote:
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implem
On Wed, 29 May 2024 19:51:36 GMT, Naoto Sato wrote:
> There is an initialization code in `Console` class that searches for the
> Console implementations. Refactoring the init code not to use lambda/stream
> would reduce the (initial) number of loaded classes by about 100 for
> java.base implem
There is an initialization code in `Console` class that searches for the
Console implementations. Refactoring the init code not to use lambda/stream
would reduce the (initial) number of loaded classes by about 100 for java.base
implementations. This would become relevant when the java.io.IO (JEP
16 matches
Mail list logo