Details
-
Bug
-
Resolution: Fixed
-
P3
-
jfx20, jfx19
-
b21
-
generic
-
generic
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8315764 | jfx17.0.9 | Jose Pereda | P3 | Resolved | Fixed | b03 |
Description
ADDITIONAL SYSTEM INFORMATION :
Checked on Windows, Linux
A DESCRIPTION OF THE PROBLEM :
When a table has many rows, there is a noticeable performance degradation when rendering bottom of the table.
Works fine when showing upper part of the table.
Problem occurs on version 19-ea+9 and up.
REGRESSION : Last worked in version 18.0.2.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
TableView with many rows:
- scroll to the bottom
- try to resize window, or select one row and then press (and hold) up/down arrow to select other rows
You should see lagging during window resize, selecting rows or table scrolling
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage stage) throws Exception {
List<String> rows = IntStream.rangeClosed(1, 1000_000).boxed()
.map(i -> "row-" + i)
.collect(Collectors.toList());
TableView<String> tableView = new TableView<>();
TableColumn<String, String> tc = new TableColumn<>("column-1");
tc.setCellValueFactory(p -> new ReadOnlyStringWrapper(p.getValue()));
tc.setPrefWidth(200);
tableView.getColumns().add(tc);
tableView.setItems(FXCollections.observableArrayList(rows));
var scene = new Scene(new StackPane(tableView), 250, 200);
stage.setScene(scene);
stage.show();
tableView.scrollTo(rows.size());
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
Checked on Windows, Linux
A DESCRIPTION OF THE PROBLEM :
When a table has many rows, there is a noticeable performance degradation when rendering bottom of the table.
Works fine when showing upper part of the table.
Problem occurs on version 19-ea+9 and up.
REGRESSION : Last worked in version 18.0.2.1
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
TableView with many rows:
- scroll to the bottom
- try to resize window, or select one row and then press (and hold) up/down arrow to select other rows
You should see lagging during window resize, selecting rows or table scrolling
---------- BEGIN SOURCE ----------
public class App extends Application {
@Override
public void start(Stage stage) throws Exception {
List<String> rows = IntStream.rangeClosed(1, 1000_000).boxed()
.map(i -> "row-" + i)
.collect(Collectors.toList());
TableView<String> tableView = new TableView<>();
TableColumn<String, String> tc = new TableColumn<>("column-1");
tc.setCellValueFactory(p -> new ReadOnlyStringWrapper(p.getValue()));
tc.setPrefWidth(200);
tableView.getColumns().add(tc);
tableView.setItems(FXCollections.observableArrayList(rows));
var scene = new Scene(new StackPane(tableView), 250, 200);
stage.setScene(scene);
stage.show();
tableView.scrollTo(rows.size());
}
public static void main(String[] args) {
launch();
}
}
---------- END SOURCE ----------
FREQUENCY : always
Attachments
Issue Links
- backported by
-
JDK-8315764 Rendering performance degradation at bottom of TableView with many rows
-
- Resolved
-
- is cloned by
-
JDK-8309156 Rendering performance degradation at bottom of TreeTableView with many rows
-
- Open
-
- relates to
-
JDK-8313639 call scrollTo on every insert results in poor performance
-
- Open
-
- links to
-
Commit openjdk/jfx17u/514dfaec
-
Commit openjdk/jfx/10f41b7d
-
Review openjdk/jfx17u/158
-
Review openjdk/jfx/1098
(2 links to)