Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 279462 Details for
Bug 549644
[GTK3] Shell dispose slowdown
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
ComboSnippet
SnippetComboDispose.java (text/x-java), 1.69 KB, created by
Patrick Tasse
on 2019-07-31 10:22:14 EDT
(
hide
)
Description:
ComboSnippet
Filename:
MIME Type:
Creator:
Patrick Tasse
Created:
2019-07-31 10:22:14 EDT
Size:
1.69 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.FillLayout; >import org.eclipse.swt.layout.GridData; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Combo; >import org.eclipse.swt.widgets.Composite; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class SnippetComboDispose { > > private static final int NUM_ITERATIONS = 40; > private static final int NUM_WIDGETS = 1000; > > public static void main(String[] args) { > Display display = new Display(); > System.out.println("gtk version: " + System.getProperty("org.eclipse.swt.internal.gtk.version")); > System.out.println("SWT version: " + SWT.getVersion()); > System.out.println(); > > for (int i = 1; i <= NUM_ITERATIONS; i++) { > Shell shell = new Shell(display); > shell.setLayout(new FillLayout()); > Composite composite = new Composite(shell, SWT.NONE); > composite.setLayout(new GridLayout(40, false)); > for (int k = 0; k < NUM_WIDGETS; k++) { > Combo combo = new Combo(composite, SWT.NONE); > combo.setLayout(new GridLayout()); > combo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); > combo.add("A"); > combo.add("B"); > combo.add("C"); > combo.select(0); > } > shell.pack(); > shell.open(); > while (display.readAndDispatch()); > display.sleep(); > long t1 = System.currentTimeMillis(); > System.out.print(String.format("shell.dispose() for %s with %d %s [%d]...\t", shell, NUM_WIDGETS, Combo.class.getSimpleName(), i)); > shell.dispose(); > long t2 = System.currentTimeMillis(); > System.out.print(String.format("%4d ms ", (t2-t1))); > for (int n = 0; n < (t2-t1); n+=100) { > System.out.print("="); > } > System.out.println(); > } > display.dispose(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 549644
:
279428
| 279462 |
279474