Repository navigation
Conversation
Contributor
vogella
force-pushed
the
coalesce-menu-manager-updates
branch
2 times, most recently
from
November 16, 2026 12:46
ffe8c8a to
8482c5c
Compare
Every merged menu contribution and every model change made while merging updated its manager right away, so a menu with N contributions was rebuilt N times while it was built. For context menus with dynamic contributions this runs on every right-click, which is the slowdown reported in bug 467000 for Papyrus and Capella. processContributions now collects the touched managers and updates each of them once at the end, skipping managers whose menu does not exist yet, so submenus still fill themselves when first shown. A test checks that the dynamic items of a view's context menu are filled as often with 20 contributions as with one. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=467000 Part of eclipse-platform#4566 Assisted-by: multiple AI agents and layers of automated tooling 🤖
vogella
force-pushed
the
coalesce-menu-manager-updates
branch
from
November 16, 2026 13:32
8482c5c to
e4c547a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a menu is rendered, every merged menu contribution and every model change made while merging updated the menu manager right away, so a menu with N contributions was rebuilt N times while it was being built. For context menus this happens on every right-click, which is the slowdown with dynamic menu contributions reported in bug 467000 for Papyrus and Capella, which both enable the
eclipse.workaround.bug467000timer to avoid it.processContributionsnow collects the managers touched during the pass and updates each of them once at the end, without a timer, while updates triggered later by context changes keep their current behavior. At the end of the pass only managers whose menu widget already exists are updated, so submenus whose widgets are created by those updates still fill themselves when first shown. A new test inMenuManagerRendererTestchecks that the number of menu bar rebuilds no longer grows with the number of contributions, andPopupMenuDynamicFillTestchecks that the dynamic items of a view's context menu are filled as often with 20 contributions as with one (before this change 25 times instead of 6).Part of #4566