Community
Participate
Working Groups
in org.eclipse.sirius.diagram.ui.internal.refresh.diagram.DDiagramCanonicalSynchronizer.createConnections(Collection<SiriusLinkDescriptor>, Map<EObject, View>, Diagram) we call collectAllLinks after each new created GMF edge. collectAllLinks iterates over all the diagram views and edges to maintain the domain2NotationMap. That becomes very costly when the number of view is important and when the number of edges increase as we are creating new gmf edges.
Created attachment 257442 [details] measurment use case
Created attachment 257444 [details] Measurments before applying the patch
Created attachment 257445 [details] Measurments after having applyed the patch
Measurement protocol: * Import and open the attached project (this project is derived from the 1Milion elements use case by only keeping one reverse package) * Open the "full-sirius-code package entities" diagram. * Uncheck the "Unsynchronized" option * Start the measurement * Perform a refresh by using the tabbar refresh action * Stop the measurement at the diagram layout beginning (when the diagram element are displayed) Without the patch, the synchronizeDiagramGMFModel took around 87s (36% of the time) with the patch it took around 8s (5% of the time)
To complete the description, collectAllLinks call is unnecessary in createConnections since the connectionsFactory.createEdge(viewDescriptor, domain2NotationMap) adds the new created edge in the domain2NotationMap. There is no reason to iterate again over all GMF views and edges
New Gerrit change created: https://git.eclipse.org/r/58729
Gerrit change https://git.eclipse.org/r/58729 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=96db814856e6c151359dae8932a4f52997195e71
Fixed on master
Verified on Sirius 4.0.0 RC1 (4.0.0.201605180923) Warning: The representation is not visible if you've not org.eclipse.sirius.sample.ecore.design. And it is also not visible in the representations by list (cause of another bug for several Viewpoints with same name). You must find it under the semantic "full-sirius-code" package.
Available in Sirius 4.0.0.