Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » The refresh performance of EditPart in Sirius(the unnecessary or repeated children EditPart refresh)
The refresh performance of EditPart in Sirius [message #1792794] Tue, 24 July 2018 08:07 Go to next message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
I have a question about refresh performance of GraphicEditPart in Sirius, such as: the class of AbstractDiagramElementContainerEditPart, AbstractDiagramBorderNodeEditPart.

Actually, in our scene, there is a performance problem of invoking AbstractDiagramElementContainerEditPart.refresh() when doing ELK(Eclipse Layout Kernel) in the diagram. The code of AbstractDiagramElementContainerEditPart.refresh() shows as below:

public void refresh() {
super.refresh();
List<?> children = getChildren();
for (int i = 0; i < children.size(); i++) {
EditPart editPart = (EditPart) children.get(i);
editPart.refresh();
}
}

In our analysis, we find that the refresh operation of children edit part will be invoked in super.refresh(). So why it needs to invoke refresh operation chidren edit part after super.children() again?
In our scene, AbstractDiagramElementContainerEditPart.refresh() will be invoked when processing notification events which is caused by layout algorithm, such location change of the element. Acctually, the notification event is related with the element, has nothing to do with its children, so why we need to do its children edit part refresh? We try to remove the process of its children edit part refresh, the performance of AbstractDiagramElementContainerEditPart.refresh() has improved 50% in our scene.
There are two questions:
1) Is there any scene that must refresh its children edit part ? Can you describe it in detail?
2) If we remove its children edit refresh operation, are there any bad effects?
We will be very grateful if anyone can give us some related advise. Thank you very much!
Re: The refresh performance of EditPart in Sirius [message #1792854 is a reply to message #1792794] Wed, 25 July 2018 07:58 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 201
Registered: August 2010
Senior Member
Hello,

We have a bugzilla about reducing the number of refresh calls: https://bugs.eclipse.org/bugs/show_bug.cgi?id=443518
This issue is not resolved yet since regressions in our tests have been detected. There is subtleties in the refresh mechanism and even if some optimizations seems safe or obvious, they may broke Sirius features.

Regards,

Florian
Re: The refresh performance of EditPart in Sirius [message #1792883 is a reply to message #1792854] Wed, 25 July 2018 11:10 Go to previous messageGo to next message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
Hi, Florian
Thank you very much! And your reply is very clear and useful for us. Thanks.
Do you have a plan to solve this issue in the new sirius vesion?
Or can you give us more detailed advise about reducing the number of refresh calls and meanwhile keep sirius features completed?
Re: The refresh performance of EditPart in Sirius [message #1792924 is a reply to message #1792883] Thu, 26 July 2018 03:00 Go to previous message
jingjing wang is currently offline jingjing wangFriend
Messages: 28
Registered: July 2017
Junior Member
About "broke sirius features", can you tell us more detail infomation, such as: what sirius features will be borken when creating and opening a diagram?
Previous Topic:Label of a container can only be located at the top of container?
Next Topic:Sirius Bordered nodes layout
Goto Forum:
  


Current Time: Sat Nov 17 11:32:49 GMT 2018

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

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

Back to the top