Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Honnen2020-06-15 15:30:29 +0000
committerJulian Honnen2020-06-15 15:30:29 +0000
commit7a663a44380ebdfc13df2796fca835e4be1ff0b5 (patch)
tree5ee75342430d7821cc8452f6fed5a3450cf63f61
parent48a6fdfc4e0cc5ea9457494e0bd72258c1b23ee5 (diff)
downloadeclipse.platform.debug-7a663a44380ebdfc13df2796fca835e4be1ff0b5.tar.gz
eclipse.platform.debug-7a663a44380ebdfc13df2796fca835e4be1ff0b5.tar.xz
eclipse.platform.debug-7a663a44380ebdfc13df2796fca835e4be1ff0b5.zip
Bug 563873 - replaced synchronous layout() callsI20200616-0320I20200616-0140
Speed up selection of launch configurations by replacing synchronous layout() calls with requestLayout(). The change reduces the number of Tree::computeSizeInPixels calls when switching between two eclipse launch configs from 55(!) to 6. With a large plugins tree (~2000 items), this saves ~30% time. Change-Id: Iabde07f2281331009ee2cdaf435dc0a4f39242e9 Signed-off-by: Julian Honnen <julian.honnen@vector.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
index c056a43dd..f7e750bf8 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTabGroupViewer.java
@@ -586,7 +586,8 @@ public class LaunchConfigurationTabGroupViewer {
} else {
fOptionsErrorLabel.setImage(null);
}
- fViewform.layout(true, true);
+ fOptionsLink.requestLayout();
+ fOptionsErrorLabel.requestLayout();
}
/**
@@ -805,13 +806,14 @@ public class LaunchConfigurationTabGroupViewer {
fApplyButton.setVisible(visible);
fRevertButton.setVisible(visible);
fOptionsLink.setVisible(visible);
+ StackLayout layout = (StackLayout)fTabPlaceHolder.getLayout();
if(visible) {
- ((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGroupComposite;
+ layout.topControl = fGroupComposite;
}
else {
- ((StackLayout)fTabPlaceHolder.getLayout()).topControl = fGettingStarted;
+ layout.topControl = fGettingStarted;
}
- fTabPlaceHolder.layout(true, true);
+ layout.topControl.requestLayout();
}
private void updateShowCommandLineVisibility(boolean visible) {

Back to the top