Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to split aird files to improve performance?
How to split aird files to improve performance? [message #1838967] Wed, 10 March 2021 15:03 Go to next message
Yufei Zhou is currently offline Yufei ZhouFriend
Messages: 44
Registered: March 2020
Member
Hi,

I'm current working on improving the performance of my sirius project. My model is like this:

|-- Root
||-- Child 1
||-- Child 2
||-- Child 3
......

The Root element composites of multiple Child elements. The top-level element in my Modeling Project is the Root element, and all the Child elements are in the same file. That caused whenever I modify a Child element's diagram, all other Child elements are modified too(there is a * mark on other Child elements' diagram editor label). What's even more, if there is a lot of Child elements in the Modeling Project (maybe 10000+ of them), every time I want to save the model, it spends several seconds to finish, due to all the elements are saved in one file.

So my question is, how can I split the model file and session aird file, to make each Child element keeped in its own file? Therefore, when I edit a Child element, the other Child elements are not modified. And when I save a Child element, the other ones won't effect the saving performance.

Is there a way to do something like that? I've tried SiriusControlCommand but unfortunately, it has a NullPointerException at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.moveRepresentation. Any advice helps a lot.

Thank you in advance.
Re: How to split aird files to improve performance? [message #1838968 is a reply to message #1838967] Wed, 10 March 2021 15:54 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
You can physically split your semantic model using EMF's Control/Uncontrol operations (provided your metamodel supports it), but this will be of no help in terms of performance here as Sirius will always load and save *all* the semantic models in a project as a consistent whole. Doing otherwise can cause inconsistencies and corrupt the models.

Having a few tens of thousands of elements inside a single resource/file should not be an issue in general. Given your description, the performance issue may be because you have a lot of elements inside the same reference? Hard to tell without more details/some profiling. If you open/edit/save your semantic model using the plain EMF-generated tree editor (completely outside of a Sirius Modeling Project), do you see the same kind of performances?

For the aird files themselves, again they can be physically split (see https://www.eclipse.org/sirius/doc/user/general/Modeling%20Project.html#MP), but again, by default Sirius will load and save them all.

This is why the "dirty state" is global to the whole modeling project, and shared by all editors/representations inside of it.


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to split aird files to improve performance? [message #1838972 is a reply to message #1838968] Wed, 10 March 2021 16:34 Go to previous messageGo to next message
Yufei Zhou is currently offline Yufei ZhouFriend
Messages: 44
Registered: March 2020
Member
Thanks Pierre, however, the performance issue is quite a critical problem to me. Is there any way I can disable the default policy, and make sirius only save the models that have been changed?
Re: How to split aird files to improve performance? [message #1838973 is a reply to message #1838972] Wed, 10 March 2021 16:38 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
You can implement your own org.eclipse.sirius.business.api.session.SavingPolicy and configure your sessions to use that using org.eclipse.sirius.business.api.session.Session.setSavingPolicy(SavingPolicy), but this can be *very tricky* to get right. See the default implementation and the comments in org.eclipse.sirius.business.internal.session.IsModifiedSavingPolicy.computeResourcesToSave().

Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: How to split aird files to improve performance? [message #1838974 is a reply to message #1838973] Wed, 10 March 2021 17:05 Go to previous message
Yufei Zhou is currently offline Yufei ZhouFriend
Messages: 44
Registered: March 2020
Member
Thank you so much! I definitely will try it.
Previous Topic:Sirius Diagram/Tables and PropertyTesters
Next Topic:creation tools
Goto Forum:
  


Current Time: Fri Apr 26 14:51:34 GMT 2024

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

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

Back to the top