Skip to content

Migrate the JFace performance tests off org.eclipse.test.performance - #4240

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:perf/jface-tree-viewer-timings
Aug 13, 2026
Merged

Migrate the JFace performance tests off org.eclipse.test.performance#4240
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:perf/jface-tree-viewer-timings

Conversation

@vogella

@vogella vogella commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Applies the treatment the editor performance tests already received to the tests under org.eclipse.jface.tests.performance: they drop the performance meter, whose measurements went nowhere because the performance database has not been configured for years, and time the individual operations instead. Every test now asserts that the operation it measures actually did something, so a run can fail rather than silently report nothing, and a manual run prints min, median, 90th percentile and maximum per scenario.

The tests are also converted to JUnit 5 throughout, which they only partly were: ViewerTest declared JUnit 5 lifecycle callbacks that were never invoked for its JUnit 4 subclasses, so its measurement setup did not run at all. Dropping UIPerformanceTestRule from the tests that never touch the workbench spares them creating and building a 300 file project.

New in this change is TreeViewerExpansionTest, which covers restoring the expansion state of a tree whose elements have a recursive hashCode, the shape of an LSP document symbol. Restoring expansion looks every item up in a table keyed by TreePath, and TreePath hashes all of its segments, so such an element gets hashed once per descendant on every lookup. It reports 361056 recursive hash visits for 1884 elements, roughly 192 per element, while the same measurement with an IElementComparer supplying a cheap key reports none. That is the cost a large outline pays on every refresh, and it was not covered by any existing test.

The bundle stays excluded from the default test run, so verification times are unaffected.

Applies the treatment the editor performance tests already received to the
tests under org.eclipse.jface.tests.performance: they drop the performance
meter, whose measurements went nowhere because the performance database has
not been configured for years, and time the individual operations instead.

Every test now asserts that the operation it measures actually did something,
so a run can fail rather than silently report nothing, and a manual run prints
min, median, 90th percentile and maximum per scenario. The tests are converted
to JUnit 5 throughout, which they only partly were: ViewerTest declared JUnit 5
lifecycle callbacks that were never invoked for its JUnit 4 subclasses, so its
measurement setup did not run at all. Dropping UIPerformanceTestRule from the
tests that never used the workbench also spares them creating and building a
300 file project.

Adds TreeViewerExpansionTest, which covers restoring the expansion state of a
tree whose elements have a recursive hashCode, the shape of an LSP document
symbol. Restoring expansion looks every item up in a table keyed by TreePath,
and TreePath hashes all of its segments, so such an element is hashed once per
descendant on every lookup. The test reports 361056 recursive hash visits for
1884 elements, about 192 per element, and the same measurement with an
IElementComparer that supplies a cheap key reports none.

The bundle stays excluded from the default test run.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   47m 43s ⏱️ - 14m 53s
 8 157 tests ±0   7 914 ✅ +1  243 💤 ±0  0 ❌  - 1 
20 373 runs  ±0  19 719 ✅ +1  654 💤 ±0  0 ❌  - 1 

Results for commit 4d944be. ± Comparison against base commit 7bb7740.

@vogella
vogella merged commit 8a937b5 into eclipse-platform:master Aug 13, 2026
18 checks passed
@vogella
vogella deleted the perf/jface-tree-viewer-timings branch August 13, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant