-
Bug
-
Resolution: Fixed
-
P3
-
9, 10
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8283363 | jfx17.0.3 | Johan Vos | P3 | Resolved | Fixed | |
JDK-8283361 | jfx11.0.15 | Johan Vos | P3 | Resolved | Fixed |
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
A DESCRIPTION OF THE PROBLEM :
Create a TableView with 50000 items and call selectAll.
The call does not finish on my system.
REGRESSION. Last worked in version 8u161
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run the sample code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output:
"item count 50000 took XXms"
where XX < 100ms
ACTUAL -
Code does not finish for 50000 items.
It is very slow for 10000 items.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import static javafx.scene.control.SelectionMode.MULTIPLE;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class Main2 extends Application {
final ObservableList<SimpleObjectProperty<Integer>> listitems = FXCollections.observableArrayList();
private static int ITEM_COUNT = 50000;
public Main2() {
for (int i = 0; i < ITEM_COUNT; ++i) {
listitems.add(new SimpleObjectProperty<>(i));
}
}
@Override
public void start(Stage primaryStage) {
final TableView<SimpleObjectProperty<Integer>> lv = new TableView<>();
final TableColumn<SimpleObjectProperty<Integer>, Integer> c = new TableColumn<>();
c.setCellValueFactory(TableColumn.CellDataFeatures::getValue);
lv.getColumns().add(c);
lv.setItems(listitems);
final HBox hbox = new HBox();
hbox.getChildren().add(lv);
primaryStage.setScene(new Scene(hbox));
lv.getSelectionModel().setSelectionMode(MULTIPLE);
primaryStage.show();
Platform.runLater(() -> {
long startMillis = System.currentTimeMillis();
lv.getSelectionModel().selectAll();
System.out.println("item count " + ITEM_COUNT + " took " + (System.currentTimeMillis() - startMillis));
System.exit(1);
});
}
public static void main(String[] args) {
Application.launch(args);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8283361 Selecting many items in a TableView is very slow
- Resolved
-
JDK-8283363 Selecting many items in a TableView is very slow
- Resolved
- relates to
-
JDK-8311505 Deselection of TableView rows is slow
- Open
- links to
-
Commit openjdk/jfx11u/1c3d9666
-
Commit openjdk/jfx17u/4af7ee97
-
Commit openjdk/jfx/8c4f966b
-
Review openjdk/jfx11u/82
-
Review openjdk/jfx17u/39
-
Review openjdk/jfx/127
-
Review openjdk/jfx/673