RFR: 8185887: TableRowSkinBase fails to correctly virtualize cells in horizontal direction [v2]

Marius Hanl mhanl at openjdk.org
Mon Dec 9 23:49:45 UTC 2024


On Thu, 5 Dec 2024 15:32:33 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> By the way, a Tree/TableView with 500 columns is barely usable - locks up the UI giving me a macOS spinning beach ball quite often. Not that it's a reasonable use case. 200 is ok. May be the 500 case can be used for profiling?

With fixed cell size, it seems okay to me. How is your table configured?

> Speaking of the vertical scrolling - I could not use the idea implemented by the VirtualFlow in the RichTextArea as it won't work in the case of very large models.

There is a lot of stuff that can improved in the `VirtualFlow`. Most of the modern table components all use fixed cells or have some kind of dynamic height calculation logic. They only rely on calculating the size themself when it really needs to (e.g. the developer turning it on).

You can for example check AG-Grid, which is a pretty nicely implemented table that is very fast and has a nice API design:
https://www.ag-grid.com/javascript-data-grid/row-height/
They also do not recommend setting the auto height, and also explain the side effects (cells and scroll bar jumping).

We only have the fixed cell size implemented, but it is not the default (and too late to change). This helps a lot since the math is very easy then. 
For something like the `RichTextArea`, this might be more complex, so I can see why the `VirtualFlow` does not fit. It is more complex as a Table, where you most likely know the height in advance.

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

PR Comment: https://git.openjdk.org/jfx/pull/1644#issuecomment-2529815614


More information about the openjfx-dev mailing list