On Mon, 24 Jul 2023 22:09:49 GMT, John Hendrikx <[email protected]> wrote:
>> modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManager.java
>> line 143:
>>
>>> 141: */
>>> 142: public void fireValueChanged(I instance, T oldValue) {
>>> 143: Object data = getData(instance);
>>
>> The `data` value could be passed into this method, which would save a
>> (potentially not devirtualized) method call.
>
> Thanks, I'll look into that, it might speed up the 1 listener cases a bit.
> The same applies to OldValueCachingListenerManager#getValue I think. I know
> it isn't possible for the add/remove calls, as the data may change if they're
> nested, but for `fireValueChanged` I never really checked after going to this
> strategy.
Have you considered passing `data` directly into the method? What is your
conclusion?
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1361519194