Community
Participate
Working Groups
Maybe this is a Duplicate of Bug 472453, which was closed as worksforme. But in our Application it is easy to reproduce it. We are running an eclipse RCP Application (based on Mars 4.5.1) on a 64Bit Linux (Ubuntu 14.04). Whenever you try to set a large amount (> 200) of Combo items via Combo#setItems(String[] items) the UI freezes (for ~ 5 seconds or longer). If you send the the Program a 'kill -s QUIT' to get a stacktrace you get the following trace: "main" #1 prio=6 os_prio=0 tid=0x00007f31e000c800 nid=0x48fd runnable [0x00007f31e74fc000] java.lang.Thread.State: RUNNABLE at org.eclipse.swt.internal.gtk.OS._gtk_combo_box_text_insert(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_combo_box_text_insert(OS.java:7106) at org.eclipse.swt.widgets.Combo.setItems(Combo.java:2050) We got an editor deploying 5 Combo Boxes with 200 items each (Selection of countries in an address record) and it takes up to 35 seconds to load on a normal client Hardware (3 years old Core i7 with 4 cores and 16 GB RAM). The same Applikation is running fine without delay on Windows 7/8/10, 32/64 Bit and Mac OS 10.11.3.
Is this reproducible on GTK2 too? Set SWT_GTK3=0 before starting Eclipse to test it.
Thank you Andrey for your fast response. No, setting SWT_GTK3=0 before starting the Application (export SWT_GTK3=0 on the bash command line, then starting App from the same shell) solves the Problem. The performance is similar to Windows 7/8/10, 32/64 Bit and Mac OS 10.11.3. when using GTK 2.
I'm having same problem when call Combo.setItems(...) and Combo.add(...) for large lists. It happens since 4.5, with SWT_GTK3=1 and SWT.READ_ONLY flag. Removing SWT.READ_ONLY it works fine.
Same problem here. On Ubuntu 16.94 64bit unix with gtk3 and rcp application base on eclipse 4.6.0
Created attachment 271107 [details] Snippet to reproduce the bug I can confirm the bug with swt 4.7.1a under Ubuntu 16.04 (gtk3.18.9) and CentOS 7 (gtk3.22.10). For me it looks like the used method org.eclipse.swt.internal.gtk.OS.gtk_combo_box_text_insert(long, int, byte[], byte[]) is very very slow the more items are in the combo box. Please se the attached snippet which reproduces the bug. Here are the results for gtk3: OS.GTK3: true 10 items: 838 millis 100 items: 854 millis 250 items: 3413 millis 500 items: 12689 millis 1000 items: 52800 millis 1500 items: 129058 millis 2000 items: 263006 millis Here are the results under gtk2: OS.GTK3: false 10 items: 249 millis 100 items: 63 millis 250 items: 108 millis 500 items: 169 millis 1000 items: 426 millis 1500 items: 803 millis 2000 items: 1391 millis Is there anything going on here? This is really a blocker for us (because we have ~2500 items in a combo box in our application). btw, these are the results without read only style (i've used border style): OS.GTK3: true 10 items: 632 millis 100 items: 380 millis 250 items: 413 millis 500 items: 473 millis 1000 items: 706 millis 1500 items: 1023 millis 2000 items: 1625 millis OS.GTK3: false 10 items: 233 millis 100 items: 82 millis 250 items: 79 millis 500 items: 119 millis 1000 items: 268 millis 1500 items: 459 millis 2000 items: 700 millis
We should investigate..
*** This bug has been marked as a duplicate of bug 489640 ***