Bug 540805 - GTK3 with large drop-down list is very slow
Summary: GTK3 with large drop-down list is very slow
Status: CLOSED DUPLICATE of bug 489640
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 9.5.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-05 12:41 EST by Anton Krug CLA
Modified: 2018-11-06 10:51 EST (History)
1 user (show)

See Also:


Attachments
GTK3 GNU MCU Eclipse dropdown screenshot (135.77 KB, image/png)
2018-11-05 12:43 EST, Anton Krug CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Krug CLA 2018-11-05 12:41:19 EST
When plugins based on CDT use the drop-down menu with many entries the whole panel freezes for ~30 second on each activation. This behaviour is not present on GTK2 (on GTK2 it's instant) and it's not depending on hardware (tested with 32core machines, with multiple i7 machines, all 32GB of RAM, SSDs, the hardware is not the issue).

For example, GNU MCU Eclipse plugins have this issue, the feature ilg.gnumcueclipse.managedbuild.cross.arm has the plugin.xml which is using CDT's build definitions

<plugin>
	<extension-point
		id="toolchains"
		name="Extra toolchains"
		schema="schema/toolchains.exsd" />
	<extension point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
		<managedBuildRevision fileVersion="4.0.0">
		</managedBuildRevision>

....

		<tool
			id="ilg.gnuarmeclipse.managedbuild.cross.tool.base.arm"
			isAbstract="true"
			name="ARM32 Targets common options">
			<option
				id="ilg.gnuarmeclipse.managedbuild.cross.option.base.arm.target.family"
				isAbstract="true"
				name="%option.target.arm.family"
				valueType="enumerated">
				<enablement type="UI_ENABLEMENT|CMD_USAGE">
					<checkOption
						holderId="ilg.gnuarmeclipse.managedbuild.cross.toolchain.base"
						isRegex="false"
						optionId="ilg.gnuarmeclipse.managedbuild.cross.option.architecture"
						value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm">
					</checkOption>
				</enablement>
				<enumeratedOptionValue
					command="-mcpu=arm1020e"
					id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.arm1020e"
					name="arm1020e">
				</enumeratedOptionValue>
				<enumeratedOptionValue
					command="-mcpu=arm1020t"
					id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.arm1020t"
					name="arm1020t">
				</enumeratedOptionValue>
				<enumeratedOptionValue
					command="-mcpu=arm1022e"
					id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.arm1022e"
					name="arm1022e">
				</enumeratedOptionValue>

....

There are around 100 entries in the CPU target menu and there are other dropdown menus as well. Is there something inherently slower and non-efficient when big lists which have to scroll outside the screen are generated in GTK3?

Noticed from other GTK2 related bugs that there is a notion to remove GTK2 and move forward to GTK3 and report any showstopper for converting into the GTK3. I would say this is a showstopper as the plugin works perfectly with GTK2 and yes the plugin is making more entries than a typical plugin would do. But it's supporting a lot of targets/cpus and there is no good way to group/simplify them either. So the list is large, but still manageable, just it's surprising that GTK3 version almost falls apart with ~100 entries when the widget is bigger than the screen and user has to scroll through them. 

Probably there could be a similar problem if the CDT GTK3 dropdown would have to populate a timezone selector with all Countries/Cities.
Comment 1 Anton Krug CLA 2018-11-05 12:43:30 EST
Created attachment 276474 [details]
GTK3 GNU MCU Eclipse dropdown screenshot

Example how the plugin looks (when opening the whole tab, the whole UI freezes for a significant amount of time)
Comment 2 Anton Krug CLA 2018-11-06 07:24:45 EST
Is the cause of the problem this bug?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=397042
Comment 3 Anton Krug CLA 2018-11-06 10:40:43 EST
Looks like it was resolved in 4.9 and probably resolved by this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=489640

*** This bug has been marked as a duplicate of bug 489640 ***
Comment 4 Alexander Kurtakov CLA 2018-11-06 10:43:07 EST
(In reply to Anton Krug from comment #3)
> Looks like it was resolved in 4.9 and probably resolved by this bug:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=489640
> 
> *** This bug has been marked as a duplicate of bug 489640 ***

Good. So nothing blocks you from moving to Gtk3. 4.9 release goal from SWT/GTK POV was "fix all blockers for GTK3 move" and I'm pleased to see there is nothing we have missed (yet:).
Comment 5 Anton Krug CLA 2018-11-06 10:51:03 EST
There is nothing I know about, looks like I can switch to GTK3 without issue on the 4.9. Thanks to Eric Williams who helped me to figure this out on the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=530841
Comment 6 Anton Krug CLA 2018-11-06 10:51:53 EST
Great job on this non-trivial move :-)