Bug 455975 - Improve SubDiagramDecorator.refresh() method in case of "complex" NavigationDescription
Summary: Improve SubDiagramDecorator.refresh() method in case of "complex" NavigationD...
Status: CLOSED FIXED
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 0.9   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0.3   Edit
Assignee: Laurent Redor CLA
QA Contact: Maxime Porhel CLA
URL:
Whiteboard:
Keywords: performance, triaged
Depends on: 455453
Blocks:
  Show dependency tree
 
Reported: 2014-12-22 11:58 EST by Laurent Redor CLA
Modified: 2015-02-11 10:44 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Redor CLA 2014-12-22 11:58:21 EST
+++ 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.
Comment 2 Jessy Mallet CLA 2015-01-20 11:49:03 EST
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%.
Comment 3 Jessy Mallet CLA 2015-01-20 11:49:21 EST
Validated on Sirius Stable pre-2.0.3 (2.0.3-S20150116-162634)
Comment 4 Maxime Porhel CLA 2015-01-22 10:03:17 EST
Available in Sirius 2.0.3.
Comment 5 Mickael LANOE CLA 2015-02-11 10:44:20 EST
Validated