eclipse-capella / capella

Open Source Solution for Model-Based Systems Engineering
https://mbse-capella.org
Eclipse Public License 2.0
239 stars 99 forks source link

DiagramServices::getEditPart(DDiagramElement) can cause deadlock #2894

Open mPorhel opened 2 months ago

mPorhel commented 2 months ago

In some situations, deadlock can occur during refresh of diagrams having the capability to display functional chains or physical paths: ie diagrams with Sirius post refresh extensions :

The detected performance issue or potential deadlock comes from the DiagramServices::getEditPart(DDiagramElement) which uses an helper using Display.syncExec method to get the ActiveEditor. This also means that a refresh occuring on a non active editor will not refresh the edit parts.

Reproduction scenario exists with Team for Capella:

mPorhel commented 2 months ago

With the provided PR, the issue is no more reproduced with the scenario we have with Team for Capella. The particular refresh done on a frozen diagram comes back to the same timings than other refreshes.