RFR: 8325154: resizeColumnToFitContent is slower than it needs to be
Marius Hanl
mhanl at openjdk.org
Fri Feb 2 08:47:04 UTC 2024
On Fri, 2 Feb 2024 08:20:09 GMT, Robert Lichtenberger <rlichten at openjdk.org> wrote:
>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java line 668:
>>
>>> 666: tableRow.updateIndex(row);
>>> 667:
>>> 668: cell.updateTableRow(tableRow);
>>
>> can this also be moved out? `cell.updateTableRow(tableRow);`
>
>> can this also be moved out? `cell.updateTableRow(tableRow);`
>
> I don't think so. Since tableRow gets an updated index above, the cell's style could change (e.g. odd / even styling).
Well, the `tableRow` is still set (but before the loop), we just update the index in this loop.
It looks like setting the table row in this loop is not needed, just once above. I also don't see that `setTableRow` has any side effects. So maybe worth a try.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1358#discussion_r1475740214
More information about the openjfx-dev
mailing list