-
Notifications
You must be signed in to change notification settings - Fork 188
Description
Creation and disposal of a Composite on Mac OS are very slow
To Reproduce
Run
Lines 72 to 105 in 02c8a22
| public void test_createComposites() { | |
| PerformanceMeter meter = createMeter("Create composites"); | |
| int samples; | |
| Performance.getDefault(); | |
| // Warm up. | |
| for(samples = 0; samples < 2; samples++) { | |
| Shell shell = new Shell(display); | |
| for (int i = 0; i < 100; i++) { | |
| Composite c = new Composite(shell, SWT.NONE); | |
| for (int j = 0; j < 10; j++) { | |
| new Composite(c, SWT.NONE); | |
| } | |
| } | |
| shell.dispose(); | |
| while(display.readAndDispatch()){/*empty*/} | |
| } | |
| for(samples = 0; samples < 100; samples++) { | |
| Shell shell = new Shell(display); | |
| meter.start(); | |
| for (int i = 0; i < 100; i++) { | |
| Composite c = new Composite(shell, SWT.NONE); | |
| for (int j = 0; j < 50; j++) { | |
| new Composite(c, SWT.NONE); | |
| } | |
| } | |
| meter.stop(); | |
| shell.dispose(); | |
| while(display.readAndDispatch()){/*empty*/} | |
| } | |
| disposeMeter(meter); | |
| } |
It takes 28 minutes to execute on Mac OS
Expected behavior
The test should complete in seconds, like on Linux and Windows.
Screenshots
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
-
Additional OS info (e.g. OS version, Linux Desktop, etc)
Reproducible in CI
Reproducible on MacOS Monterey -
JRE/JDK version
17
Version since
The test performance meter was implemented incorrectly - it failed to measure deferred events.
Performance tests were never run on CI and performance assertions were disabled three years ago.
eclipse-platform/eclipse.platform.releng@071af51#diff-55cfefb6d6ca7ae136d8057fc7ea93d8b62af5db44fc77cec0f961fc68d2bdbdL85
So the exact date of regression is unclear.
Workaround (or) Additional context
Don't create composites on MacOS.