RFR: 8197991: Selecting many items in a TableView is very slow [v3]

Abhinay Agarwal duke at openjdk.java.net
Tue Dec 21 12:22:03 UTC 2021


On Fri, 17 Dec 2021 17:46:54 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> Abhinay Agarwal has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update ROW_COUNT to 700_000
>
> modules/javafx.controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java line 877:
> 
>> 875:             if (size >= 0) {
>> 876:                 return size;
>> 877:             }
> 
> Using lazy evaluation means that you need to be extra careful that the size is invalidated in all the right places. One method that needs to be checked is the `set(int index, int... indices)` method. How carefully have you checked to make sure that nothing that could change the size fails to update the `size` field?
> 
> Related to this, are you satisfied that the current set of unit tests are sufficient to catch any potential problems, and that you don't need to add more tests?

Good point. All the test cases that I could think of were already present in `MultipleSelectionModelImplTest`. Nevertheless, test cases for different `set()` methods can definitely be added. I will work on it.

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

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


More information about the openjfx-dev mailing list