Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2018-05-29 17:06:32 +0000
committerLeo Ufimtsev2018-05-29 19:09:44 +0000
commit65ddc8a5374963e50f794bf6b3b36d84dd19105d (patch)
tree24fbb94106527782111720cd6f129981140c2578 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
parent2bd7cc57d6f8db85984adca7abc84236618f0b2d (diff)
downloadeclipse.platform.swt-65ddc8a5374963e50f794bf6b3b36d84dd19105d.tar.gz
eclipse.platform.swt-65ddc8a5374963e50f794bf6b3b36d84dd19105d.tar.xz
eclipse.platform.swt-65ddc8a5374963e50f794bf6b3b36d84dd19105d.zip
Bug 489640 [GTK3] setting a lot of items to combobox is extremely slow
(Bug fix). Setting wrap causes O(n^2) performance regression because after every insert the drop-down list size is re-computed. Solution: 1) Turn off wrap during insert (to fix bulk insert, e.g setItems(...)) 2) Delay enabling (so that multiple single-insert calls [e.g add(.)] are not delayed if called in a loop. Tests: - Attached snippets: Before fix: Gtk3: 1000ms After fix: Gtk3: 10ms (event faster than gtk2's 23ms). - Child eclipse works well. - All SWT jUnits pass. - Combo box looks same as before. Patchset 4: - Implemented similar logic for removing items to fix performance. Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=4896403 Change-Id: Ibf14b35712277e068bc719d073a482ab5c04fb7f Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index c999193244..9bd4eb22c9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -401,6 +401,7 @@ typedef enum {
_1gtk_1color_1selection_1set_1has_1palette_FUNC,
_1gtk_1combo_1box_1get_1active_FUNC,
_1gtk_1combo_1box_1get_1model_FUNC,
+ _1gtk_1combo_1box_1get_1wrap_1width_FUNC,
_1gtk_1combo_1box_1popdown_FUNC,
_1gtk_1combo_1box_1popup_FUNC,
_1gtk_1combo_1box_1set_1active_FUNC,

Back to the top