Skip to content

Stop leaking extension registries and timer threads in the model editor - #2547

Open
vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:vogella/e4-leaks-registry-cache
Open

vogella wants to merge 1 commit into
eclipse-pde:masterfrom
vogella:vogella/e4-leaks-registry-cache

Conversation

@vogella

@vogella vogella commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The e4 model editor created a new PDEExtensionRegistry each time it rebuilt its cache of model resources, and the editor3x extension lookup did the same per call. Each instance registers listeners on the PluginModelManager that are never removed, so both now use the shared registry of PDECore, which also avoids rebuilding the registry from scratch. The cached resource set was published before it was filled, so an e4xmi change during a build could null it under the builder; it is now built locally and only published if no change invalidated it meanwhile. The icon dialog started a new Timer thread on every keystroke and now debounces its search with a single Job that is cancelled when the dialog closes.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Test Results

  138 files  ±0    138 suites  ±0   31m 19s ⏱️ - 4m 38s
3 602 tests +1  3 548 ✅ +1   54 💤 ±0  0 ❌ ±0 
9 555 runs  +3  9 425 ✅ +3  130 💤 ±0  0 ❌ ±0 

Results for commit 1a887bf. ± Comparison against base commit 7558f74.

♻️ This comment has been updated with latest results.

Util.getModelElementResources and the editor3x PDEExtensionLookup created
a new PDEExtensionRegistry on every call. Each one registers listeners on
the PluginModelManager and is never disposed; use the shared registry of
PDECore instead.

The cached resource set was assigned before it was filled, so a workspace
change could null it in the middle of a build. Build into a local set and
publish it only if no e4xmi change invalidated it meanwhile.

The icon dialog started a new Timer thread on every keystroke. It now
debounces the search with a Job that is cancelled when the dialog closes.

Assisted-by: multiple AI agents and layers of automated tooling 🤖
@vogella
vogella force-pushed the vogella/e4-leaks-registry-cache branch from 3844120 to 1a887bf Compare October 10, 2026 10:14
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