RFR: 8197991: Selecting many items in a TableView is very slow [v3]
yosbits
github.com+7517141+yososs at openjdk.java.net
Tue Sep 22 09:16:51 UTC 2020
On Mon, 14 Sep 2020 09:50:05 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:
>> yosbits has refreshed the contents of this pull request, and previous commits have been removed. The incremental views
>> will show differences compared to the previous content of the PR.
>
> modules/javafx.controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java line 899:
>
>> 897: for (;;) {
>> 898: index = bitset.nextSetBit(index + 1);
>> 899: if (index < 0) {
>
> As we are checking for nextSetBit, shouldn't we be checking for overflow rather than underflow?
> Refer - [javadoc](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/util/BitSet.html#nextSetBit(int))
Since it cannot be loaded with a smaller number of items than Integer.MAX_VALUE (it looks like it freezes), overflow
does not occur in the actual usage environment.
-------------
PR: https://git.openjdk.java.net/jfx/pull/127
More information about the openjfx-dev
mailing list