Skip to content

Add efficiency regression test for the compare editor open path#2796

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:compare-open-efficiency-test
Open

Add efficiency regression test for the compare editor open path#2796
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:compare-open-efficiency-test

Conversation

@vogella

@vogella vogella commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Opening a compare editor currently re-reads the compared element contents up to 15 times per side (observed: 15 on Linux and Windows, 9 on macOS), and with the unified diff preference enabled it runs prepareInput synchronously on the UI thread. This adds CompareOpenEfficiencyTest, which opens a compare editor end to end and pins these observable contracts: a bounded number of content reads per open, exactly one prepareInput per open, and preparation off the UI thread for inputs that can run as a job. The read count is asserted as an upper bound because the exact value is platform dependent; the bound is lowered as the follow-up changes for the linked issue remove the redundant reads and fix the unified diff threading. Unlike timing thresholds, these assertions are deterministic, so they are safe to enforce in CI.

Contributes to #2795

@vogella vogella force-pushed the compare-open-efficiency-test branch from e7c2ad3 to 5b10726 Compare July 3, 2026 05:52
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ± 0      54 suites  ±0   58m 14s ⏱️ - 1m 16s
 4 685 tests + 5   4 663 ✅ + 5   22 💤 ±0  0 ❌ ±0 
11 949 runs  +15  11 796 ✅ +15  153 💤 ±0  0 ❌ ±0 

Results for commit 2d1ab5b. ± Comparison against base commit 6bef442.

♻️ This comment has been updated with latest results.

CompareOpenEfficiencyTest opens a compare editor end to end and pins
three observable contracts with deterministic assertions: how often the
element contents are read during a single open (currently 15 times per
side), that prepareInput runs exactly once per open, and that it does
not run on the UI thread for inputs that can run as a job. With the
unified diff preference enabled the test documents that prepareInput
currently does run on the UI thread. This records the baseline for the
open path performance work.

Contributes to eclipse-platform#2795
@vogella vogella force-pushed the compare-open-efficiency-test branch from 5b10726 to 2d1ab5b Compare July 3, 2026 07:02
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