How to split aird files to improve performance? [message #1838967] |
Wed, 10 March 2021 15:03 |
Yufei Zhou 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 |
|
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 #1838973 is a reply to message #1838972] |
Wed, 10 March 2021 16:38 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.04628 seconds