RFR: JDK-8290310: ChangeListener events are incorrect or misleading when a nested change occurs [v11]
John Hendrikx
jhendrikx at openjdk.org
Mon Jul 24 22:04:50 UTC 2023
On Mon, 24 Jul 2023 19:58:04 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix generic warnings
>
> modules/javafx.base/src/main/java/com/sun/javafx/binding/ListenerManager.java line 145:
>
>> 143: Object data = getData(instance);
>> 144:
>> 145: if (data instanceof ListenerList) {
>
> Why is `ListenerList` checked first, when most observables only have a single `InvalidationListener`?
For some (unclear to me) reason this order performs better in my benchmark, even for the cases that only have a single invalidation listener. I've tweaked this method extensively, with different orders, and this was about the best I could get it. That said, the differences are small, and we can go with a more logical order.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1272801049
More information about the openjfx-dev
mailing list