Community
Participate
Working Groups
We tested the required time to create 1000 UML Class in a Class Diagram, using ElementType (Configured Specialization Type: Class Shape [org.eclipse.papyrus.umldi.Class_Shape]). Currently it takes around 50s for 1000 Classes. We analyse that : - the command creation doesn't take time - the command execution takes many time - the biggest part of the time is taken by the DiagramEventBroker, which notifies many elements on many purpose - as the tests create 1000 classes on the root of the diagram (the root Package of the model), we spare many time in org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPart.handleNotificationEvent(Notification). - the method org.eclipse.gef.editparts.AbstractEditPart.refreshChildren() each called 1 time on each EditPart for the addChild method via the methodorg.eclipse.gef.editparts.AbstractEditPart.addNotify() - so for 1 class : 7 refresh, 1 one for the root EditPart and 1 by children EditPart -> 7 calls to getVisibleChildren for 1 classShape, then 2 time for each child We probably should improve the methods refreshChildren and getVisibleChildren. A cache for getVisibleChildren could help (but don't forget the visibility can be obtained using CSS#isVisible). There are 2 EditPolicy probably to improve too. Removing them, we gain around 10s. for 1000 elements: - PapyrusCanonicalEditPolicy - QualifiedNamDisplayEditPolicy Commenting the notification in DiagramEventBroker, we drop by 40 seconds to be around 8 s. for 1000 Classes. Of course, it is just informative, the concerned method make requried stuff.