Skip to content

Create the value diff only when a property value changed - #4477

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:lv/property-value-diff-on-change
Oct 12, 2026
Merged

vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:lv/property-value-diff-on-change

Conversation

@vogella

@vogella vogella commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

SimplePropertyObservableValue re-reads the property on every getValue() and setValue() once it has listeners, and it created a ValueDiff before checking whether the value had changed at all. In the common case of an unchanged read that diff was thrown away immediately. The diff is now created only when a change event is actually fired, which removes a short-lived allocation from every observed property access without changing what listeners receive.

SimplePropertyObservableValue checks for a change on every getValue()
and setValue() once it has listeners, and created a ValueDiff before
comparing the old and new value. For the common unchanged read the diff
was discarded right away.

Create the diff only when a change event is fired.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   867 files  ±0     867 suites  ±0   54m 48s ⏱️ + 3m 48s
 8 413 tests ±0   8 171 ✅ ±0  242 💤 ±0  0 ❌ ±0 
21 114 runs  ±0  20 431 ✅ ±0  683 💤 ±0  0 ❌ ±0 

Results for commit f0ebf62. ± Comparison against base commit b291672.

@vogella
vogella merged commit 7c96441 into eclipse-platform:master Oct 12, 2026
18 checks passed
@vogella
vogella deleted the lv/property-value-diff-on-change branch October 12, 2026 06:51
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