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

2022-01-06 Thread Kevin Rushforth
On Fri, 17 Dec 2021 20:38:56 GMT, Kevin Rushforth wrote: >> Abhinay Agarwal has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update ROW_COUNT to 700_000 > > tests/manual/controls/SelectListViewTest.java line 66: > >> 64: long t

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

2022-01-06 Thread Abhinay Agarwal
On Wed, 22 Dec 2021 13:32:06 GMT, Kevin Rushforth wrote: >> A cache that's manually invalidated and then validated when needed is a form >> of lazy evaluation. The main point, regardless of how you name it, is to >> ensure that every call that modifies the underlying BitSet invalidates the >>

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

2021-12-22 Thread Kevin Rushforth
On Tue, 21 Dec 2021 17:56:22 GMT, Kevin Rushforth wrote: >> This is a cache of the cardinality method of BitSet, not Lazy evaluation. It >> sets invalidity (-1) in the method call that changes the bit. This could be >> a subclass of BitSet to make the code more readable. This patch does not

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

2021-12-21 Thread Kevin Rushforth
On Tue, 21 Dec 2021 17:08:26 GMT, yosbits wrote: >> What about the first part of my question? Have you looked at the set logic >> to ensure that `size` is being invalidated in all places it should be. The >> `set(int index, int... indices)` method does not directly invalidate `size`. >> If

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

2021-12-21 Thread yosbits
On Tue, 21 Dec 2021 15:35:32 GMT, Kevin Rushforth wrote: >> 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. > > What about the

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

2021-12-21 Thread Kevin Rushforth
On Tue, 21 Dec 2021 12:13:55 GMT, Abhinay Agarwal wrote: >> modules/javafx.controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java >> line 877: >> >>> 875: if (size >= 0) { >>> 876: return size; >>> 877: } >> >> Using lazy evaluation

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

2021-12-21 Thread Abhinay Agarwal
On Fri, 17 Dec 2021 17:46:54 GMT, Kevin Rushforth wrote: >> Abhinay Agarwal has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update ROW_COUNT to 700_000 > >

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

2021-12-21 Thread Abhinay Agarwal
On Fri, 17 Dec 2021 19:18:23 GMT, Kevin Rushforth wrote: >> Abhinay Agarwal has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update ROW_COUNT to 700_000 > >

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

2021-12-17 Thread Kevin Rushforth
On Fri, 26 Nov 2021 19:49:37 GMT, Abhinay Agarwal wrote: >> This work improves the performance of `MultipleSelectionModel` over large >> data sets by caching some values and avoiding unnecessary calls to >> `SelectedIndicesList#size`. It further improves the performance by reducing >> the

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

2021-12-17 Thread Kevin Rushforth
On Wed, 24 Nov 2021 14:39:57 GMT, yosbits wrote: >> But why? The initialization block of a `for` statement is exactly where >> you'd put loop-scoped variables. > > This change significantly improves performance because the BitSet's size () > method is an O (N) implementation. You may be

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

2021-12-17 Thread Kevin Rushforth
On Fri, 26 Nov 2021 19:49:37 GMT, Abhinay Agarwal wrote: >> This work improves the performance of `MultipleSelectionModel` over large >> data sets by caching some values and avoiding unnecessary calls to >> `SelectedIndicesList#size`. It further improves the performance by reducing >> the

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

2021-11-26 Thread yosbits
On Fri, 26 Nov 2021 19:44:14 GMT, Abhinay Agarwal wrote: >> tests/manual/controls/SelectTableViewTest.java line 19: >> >>> 17: // final int ROW_COUNT = 80_000; >>> 18: // final int ROW_COUNT = 50_000; >>> 19: // final int ROW_COUNT = 8_000; >> >> The number is meaningful because

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

2021-11-26 Thread Abhinay Agarwal
On Fri, 26 Nov 2021 13:10:08 GMT, yosbits wrote: >> Abhinay Agarwal has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update ROW_COUNT to 700_000 > > tests/manual/controls/SelectTableViewTest.java line 19: > >> 17: // final int

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

2021-11-26 Thread Abhinay Agarwal
> This work improves the performance of `MultipleSelectionModel` over large > data sets by caching some values and avoiding unnecessary calls to > `SelectedIndicesList#size`. It further improves the performance by reducing > the number of iterations required to find the index of an element in

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

2020-12-30 Thread yosbits
On Tue, 29 Dec 2020 09:50:42 GMT, Jose Pereda wrote: >> I commented. > > I've run SelectListView and SelectTableView tests and both run fine. As for > the SelectTableView test, with 700_000 rows, when there is no selection, > pressing SelectToEnd takes around 3.1 seconds, as expected. However,

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

2020-12-29 Thread Jose Pereda
On Tue, 22 Sep 2020 09:14:31 GMT, yosbits 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. > > I commented. I've run SelectListView and

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

2020-09-22 Thread yosbits
On Tue, 22 Sep 2020 09:04:15 GMT, yosbits wrote: >> https://bugs.openjdk.java.net/browse/JDK-8197991 >> >> The performance of the selectAll and selectRange methods of the >> MultiSelectionModel class has been greatly improved. >> >> This greatly improves the response when selecting multiple

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

2020-09-22 Thread yosbits
On Mon, 14 Sep 2020 09:50:05 GMT, Ajit Ghaisas 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. > >

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

2020-09-22 Thread yosbits
> https://bugs.openjdk.java.net/browse/JDK-8197991 > > The performance of the selectAll and selectRange methods of the > MultiSelectionModel class has been greatly improved. > > This greatly improves the response when selecting multiple items in ListView > and TableView. > > However, in

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

2020-09-22 Thread yosbits
On Mon, 14 Sep 2020 09:53:25 GMT, Ajit Ghaisas 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. The pull >> request contains one new commit