Bug 502412 - Property sheets from inactive editors are refreshed on each model change
Summary: Property sheets from inactive editors are refreshed on each model change
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Properties (show other bugs)
Version: 4.0.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: backport
Keywords: performance, triaged
Depends on:
Blocks:
 
Reported: 2016-09-28 09:05 EDT by Pierre-Charles David CLA
Modified: 2017-08-21 05:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2016-09-28 09:05:13 EDT
This requires launching a runtime in debug mode and setting some breakpoints to see, as the result is "only" visible as a performance issue.

Steps to reproduce:
1. Open a table, select an element
2. Open a diagram, select an element
3. Select a (semantic) element in the model explorer
4. In the diagram, move some graphical element

Result: 3 TEDCA.Listener (1 for each editor, 1 for the model explorer) are notified of the transaction, and each will trigger an EEFTabbedPropertySheetPage.doSetInput (via refreshPage() called from their associated Updater). Only one of them actually makes sense, the rest is refreshing pages which are obsolete/inactive/invisible.

To see it, put a breakpoint in org.eclipse.eef.ide.ui.internal.Updater.apply(List<Notification>). Only enable it right before step 4 which modifies the model. You will see several invocations of Updater.apply(), each for a different EEFTabbedPropertySheetPage, and only one of each is actually relevant.

Updater is normally disabled (and the corresponding post-commit listener removed from the TED) on org.eclipse.eef.ide.ui.api.EEFTab.aboutToBeHidden(), but in this scenario this method is never called.
Comment 1 Pierre-Charles David CLA 2016-09-28 09:07:38 EDT
TEDCA == org.eclipse.sirius.ui.properties.internal.TransactionalEditingDomainContextAdapter
Comment 2 Pierre-Charles David CLA 2016-10-21 05:32:43 EDT
Moving to 4.1.2, as this will require changes on the EEF side, and the EEF version for Sirius 4.1.1 is freezed.
Comment 3 Pierre-Charles David CLA 2016-11-21 05:06:18 EST
I don't think we'll be able to tackle this in the timeframe for 4.1.2 (which we'd like to release in Neon.2). Moving to 5.0 but marking as backport candidate, if we can get a fix that does not have too much impact.