Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Creating a Pictogram link triggers refresh of entire diagram (bug?)
Creating a Pictogram link triggers refresh of entire diagram (bug?) [message #1705330] Thu, 13 August 2015 19:45 Go to next message
Peder Herborg is currently offline Peder HerborgFriend
Messages: 5
Registered: July 2009
Junior Member

We've been investigating why our larger graphiti diagrams are very slow at refreshing when adding or removing shapes (up multiple seconds).

It turns out that this due to the fact that each shape is linked to a business object in the AddXXXFeature method:

public PictogramElement add(IAddContext context) {
link(imageShape, visibleGA);

This triggers an EMF change notification to the Diagram rootnode which causes the DiagramChangelistener to call the setRefreshAll.

Is is possible to filter out EMF change events related to link that are caused be creating a link to avoid refreshing the entire diagram or is this the intented behavior?

Best regards
Peder Herborg

Re: Creating a Pictogram link triggers refresh of entire diagram (bug?) [message #1705554 is a reply to message #1705330] Mon, 17 August 2015 13:17 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1885
Registered: July 2009
Location: Walldorf, Germany
Senior Member

well, it is the entended default behavior. For large diagrams or many links
this will result in performance issues as you describe.

You may implement your own DiagramChangeListener based on the default
implementation and replace it via DiagramBehavior.

Previous Topic:Diagram update after model change
Next Topic:Controlling selection of invisible rectangle
Goto Forum:

Current Time: Thu Mar 22 06:11:52 GMT 2018

Powered by FUDForum. Page generated in 0.01953 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software