Overhead for table columns.
tomas.mikula at gmail.com
Thu Aug 14 22:35:18 UTC 2014
On Thu, Aug 14, 2014 at 9:01 PM, Sean True <sean.true at gmail.com> wrote:
> We've been looking at very large tables for use in data grid display.
> Row count scales very nicely indeed, but column count is much more
To explain your observation: TableView is based on VirtualFlow, which
optimizes the number of cells simultaneously attached to the scene
graph in one direction (horizontal or vertical). For TableView,
vertical VirtualFlow is used, which means rows are optimized
(invisible rows are not in the scene graph), while all columns for
each visible row are in the scene graph.
To be able to scroll smoothly through the table, you would want a
two-dimensional virtual flow. You can look at VirtualFlow.java from
OpenJFX or from my alternative virtual flow implementation Flowless
 to get an idea about the complexity of the one-dimensional case.
If you don't require smooth scrolling and are fine with scroll by one
row/column at a time, you could display a small table with fixed cell
count, say 30x20 (maybe calculated dynamically based on the available
area), and display your own scrollbars that will update the data model
behind this small table. Not the best solution, but much less work.
> In the March time frame, our tests showed that each column had
> approximately 100KB overhead (using VisualVM), which is negligible at 100
> columns, but at 10,000 columns becomes an issue. We have real world use
> cases of more columns than that .
> Is there planned effort to reduce the overhead, or are we looking at likely
> having to build our own table component to serve these large needs?
> -- Sean
More information about the openjfx-dev