changeset 1674:0f18a668cf80

RT-23873: Investigate (and improve) ListView / TreeView / TableView performance
author jgiles
date Tue, 21 Aug 2012 10:50:56 +1200
parents 3edd0328371a
children beb41249e03b
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableRowSkin.java javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableRowSkin.java	Mon Aug 20 19:06:59 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TableRowSkin.java	Tue Aug 21 10:50:56 2012 +1200
@@ -41,7 +41,6 @@
 import javafx.collections.ObservableList;
 import javafx.geometry.Insets;
 import javafx.scene.Node;
-import javafx.scene.control.*;
 
 /**
  */
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Mon Aug 20 19:06:59 2012 +1200
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Aug 21 10:50:56 2012 +1200
@@ -206,15 +206,13 @@
         // lead to performance degradation until it is handled properly.
         if (countChanged) {
             layoutChildren();
-        }
 
-        // Fix for RT-13965: Without this line of code, the number of items in
-        // the sheet would constantly grow, leaking memory for the life of the
-        // application. This was especially apparent when the total number of
-        // cells changes - regardless of whether it became bigger or smaller.
-        sheetChildren.clear();
+            // Fix for RT-13965: Without this line of code, the number of items in
+            // the sheet would constantly grow, leaking memory for the life of the
+            // application. This was especially apparent when the total number of
+            // cells changes - regardless of whether it became bigger or smaller.
+            sheetChildren.clear();
 
-        if (countChanged) {
             Parent parent = getParent();
             if (parent != null) parent.requestLayout();
         }