On Tue, 8 Oct 2024 23:09:18 GMT, Andy Goryachev <[email protected]> wrote:
>> Michael Strauß has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> seal Platform.Preferences
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PreferenceProperties.java
> line 147:
>
>> 145: for (Map.Entry<String, ChangedValue> entry :
>> changedPreferences.entrySet()) {
>> 146: PreferenceMapping<?> mapping =
>> platformKeyMappings.get(entry.getKey());
>> 147: if (mapping != null) {
>
> this code seems rather inefficient:
>
> why are we doing linear search?
> also why are we searching through colors when, for example, the changed
> property is a boolean?
>
> is it possible to do a simple hash map lookup instead?
Good idea, this has also removed quite a bit of code.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1592#discussion_r1792871242