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

Michael Strauß mstrauss at openjdk.java.net
Mon Nov 22 16:28:17 UTC 2021


On Mon, 22 Nov 2021 15:55:03 GMT, Abhinay Agarwal <duke at openjdk.java.net> wrote:

>> the for-loop is certainly faster and would allocate less memory - i find the `for(int i = 0, max = size())`-style a bit odd
>
> I could move `int max = size();` outside the loop

But why? The initialization block of a `for` statement is exactly where you'd put loop-scoped variables.

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

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


More information about the openjfx-dev mailing list