Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8304023 | jfx17.0.7 | Johan Vos | P3 | Resolved | Fixed |
When the VirtualFlow is asked to scroll to a specific item, that item is (in the next layoutChildren invocation) initially placed at the first row of the flow (1).
If there are not enough items left to fill the remainder of the flow, and if the specific item is not the first one in the list, the contents of the flow are shifted down (2).
Between (1) and (2) the remainder of the flow (the cells that won't be filled with real items) is filled with empty cells (because addTrailingCells() is called).
Because of phase (2), these empty cells are never rendered (they are outside the viewport when the layoutChildren method returns) but their allocation and presence consume resources (e.g. methods to calculate the size are invoked).
It would be better to do the check on empty rows after the specified item before we start filling the flow with empty cells. That way, addTrailingCells will only add empty cells when they are really required.
If there are not enough items left to fill the remainder of the flow, and if the specific item is not the first one in the list, the contents of the flow are shifted down (2).
Between (1) and (2) the remainder of the flow (the cells that won't be filled with real items) is filled with empty cells (because addTrailingCells() is called).
Because of phase (2), these empty cells are never rendered (they are outside the viewport when the layoutChildren method returns) but their allocation and presence consume resources (e.g. methods to calculate the size are invoked).
It would be better to do the check on empty rows after the specified item before we start filling the flow with empty cells. That way, addTrailingCells will only add empty cells when they are really required.
- backported by
-
JDK-8304023 VirtualFlow creates unneeded empty cells
- Resolved
- duplicates
-
JDK-8291467 TableView not properly refreshed after scroll to bottom
- Closed
- relates to
-
JDK-8296871 TableView scrollTo(lastRow) displays the last row at the top of the viewport
- Open
-
JDK-8291467 TableView not properly refreshed after scroll to bottom
- Closed
- links to
-
Commit openjdk/jfx17u/f2f296b2
-
Commit openjdk/jfx/eaddb0fb
-
Review openjdk/jfx17u/116
-
Review openjdk/jfx/863
(3 links to)