Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #455453 +++ This method can be improved. A part of it uses DialectManager.getRepresentations(RepresentationDescription, Session) that searches in all session. With small adaptations, we can use DialectManager.getRepresentations(EObject, Session) that uses a CrossReferencer and is more efficient. This performance problem has been detected by a customer but the original use case can not be joined. A use case has been made to reveal this problem. Step to reproduce: * Launch a runtime with Yourkit (or another analyzer) * Stop all recordings (CPU, Memory, Stack Telemetry, Exception Telemetry, ...) * Verify that "automatic refresh" is enabled * Import the project from SubDiagramDecoratorImprovement.zip * Open the diagram "myDiag org.eclipse.sirius.business.api.helper" * Select a green square on SiriusUtil * Start CPU Profiling (Sampling mode is enough) * Click on "Delete from model" in the tabbar * Wait that the green square disapears and click on "Capture snapshot" in Yourkit * Open the snapshot and check the ratio of time passed in org.eclipse.sirius.diagram.ui.tools.internal.actions.delete.DeleteFromModelWithHookAction.doRun(IProgressMonitor) for org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.refresh() : 43% with current state.
The 4 corresponding commits have been cherry-picked: * http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?h=v2.0.x&id=17208728753aeb89f423ef75f1ca8b626d0de378 * http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?h=v2.0.x&id=51a066cef6d590063d3993c9fd521410d5354571 * http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?h=v2.0.x&id=826bcc8eaa46b1c2c0f4401d2d48820267a71775 * http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?h=v2.0.x&id=56866ee341cb5bf2ab268d0d786eb28ed6d8c578
In the last step to reproduce, the method org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.refresh() does not appear in Yourkit trace because the method runs too fast to be evaluate. However, if you use the Time Profiler View of eclipse and you reproduce the different step, you can see that the method org.eclipse.sirius.diagram.ui.tools.internal.providers.decorators.SubDiagramDecorator.refresh() is used. So the ratio is 0%.
Validated on Sirius Stable pre-2.0.3 (2.0.3-S20150116-162634)
Available in Sirius 2.0.3.
Validated