RFR: 8253086: Optimization of removeAll and retainAll of ObservableListWrapper [v4]

yosbits github.com+7517141+yososs at openjdk.java.net
Wed Oct 7 14:28:15 UTC 2020


On Wed, 7 Oct 2020 12:11:12 GMT, Eric Bresie <github.com+370894+ebresie at openjdk.org> wrote:

>>> 
>>> 
>>> I'm preparing a change that won't break compatibility, so stay tuned.
>>> The test seems to need to be added.
>> 
>> sounds good :) Note, that I'm working on [JDK-8254040](https://bugs.openjdk.java.net/browse/JDK-8254040) which will add
>> regression tests that your change will have to pass (turned out that f.i. FilteredList also relies on the two-pass
>> approach).  Until you are done, you might consider changing the state of this to Draft.
>
> Hopefully not looking in the wrong version but:
> (1) When dealing with BitSets previously, maybe this was by design butI didn’t see any usage of BitSet’s
> “clear(<index>)” to remove items from the BitSet.  Although given move to remove it may be moot now. (2) If no longer
> using the BitSet, may want to remove the import for this (3) In context, usage of HashSet was suggested.  I don’t
> believe HashSet is thread safe.  If using it, may want to consider ConcurrentHashSet.  Although not sure if this is
> more efficient either.

I plan to push changes that remain compatible, respecting the judgment of the project leader, but I would like to point
out the following:

There seems to be a problem with the reproduction code as follows.

* If there are duplicate items, the unselected parts will also be deleted.
* Using selectIndices () is more advantageous in terms of performance than selectedItems ().

Therefore, this context should normally be avoided,
Seems like less important compatibility.

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

PR: https://git.openjdk.java.net/jfx/pull/305


More information about the openjfx-dev mailing list