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

yosbits github.com+7517141+yososs at openjdk.java.net
Wed Oct 7 11:42:11 UTC 2020


On Wed, 7 Oct 2020 11:30:16 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>>> 
>>> 
>>> did anyone look into Java-Collection-Frameworks (ArrayList and friends or Eclipse-Collections) how they handle this
>>> situation effeciently?
>> 
>> not me - but good idea, provided they support modifications to the source list while removing.
>> 
>> BTW, just noticed that Tree/Table/View never had the issue that was fixed with introducing the two-pass approach, can't
>> nail why not - they are using the same selectedItems (from MultipleSelectionModelBase), any ideas?
>
>> BTW, just noticed that Tree/Table/View never had the issue that was fixed with introducing the two-pass approach, can't
>> nail why not - they are using the same selectedItems (from MultipleSelectionModelBase), any ideas?
> 
> because it's not a live-lookup: TreeView keeps some cache of exposed treeItems - that's to where the getModelItem() in
> selectedItems is delegated to - which is updated on receiving a listChange, that is not during the modification.

I'm preparing a change that won't break compatibility, so stay tuned.
The test seems to need to be added.

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

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


More information about the openjfx-dev mailing list