Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » A problem with model loading of models(Metamodels with id feature enabled)
A problem with model loading of models [message #1753883] Sat, 11 February 2017 14:39 Go to next message
Eclipse UserFriend
Hello,

"Loading models" part of the models transformations takes forever for the metamodels that has "id" feature on for some attribute. If you are using the configuration interface, Eclipse freezes, which is the same problem with "takes forever".

The problem occurs even for the models around 20 mb, which work well if their metamodel does not have id feature set.

I have attached an minimal example with necessary configurations. exampleReadOnlyTransformation is enough for experiencing the problem.
exampleModelCreatorTransformation can be used to create various sizes of models to test.

Thanks.
Re: A problem with model loading of models [message #1754026 is a reply to message #1753883] Mon, 13 February 2017 22:17 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Bugra,

Many thanks for putting in the effort to write a model generator and demonstrate the problem! It appears that the culprit for this is EMF's DEFER_IDREF_RESOLUTION flag which the Epsilon EMF bridge sets to true by default (this should be "a good thing" according to [1]). To work around this, please un-tick the "Read on load" option in your model's configuration dialog and add the following line at the beginning of the first pre section of your transformation.

InSGMMModel.resource.load(Map{"DEFER_IDREF_RESOLUTION" = false});


Cheers,
Dimitris

[1] https://www.eclipse.org/modeling/emf/docs/performance/EMFPerformanceTips.html
Re: A problem with model loading of models [message #1754211 is a reply to message #1754026] Wed, 15 February 2017 13:07 Go to previous messageGo to next message
Eclipse UserFriend
Dimitris,

Thanks for the reply. This actually seems to solve the problem. I checked it and I agree with you to take this flag to be true by default, as suggested.

This reference resolving may perform different depending on the model structure (number forward / backward references in the XML file), which was the case for the example project.
Re: A problem with model loading of models [message #1754327 is a reply to message #1754211] Thu, 16 February 2017 12:12 Go to previous messageGo to next message
Eclipse UserFriend
Hello Dimitris,

I have worked on the problem some more, not on the minimal example I shared, but on the real example I am working with.

The solution you offered works well with the minimal example, but not with the real one.

After searching for a while, I have found the following solution that worked:

<Model name>.resource.setIntrinsicIDToEObjectMap(new Native("java.util.HashMap")); 
<Model name>.resource.load(null);	


As far as I understood, this provides a hash to record the processed XML elements with intrinsic ids for lazy reference resolving.
Re: A problem with model loading of models [message #1754329 is a reply to message #1754327] Thu, 16 February 2017 12:22 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Many thanks for sharing your solution!

Cheers,
Dimitris
Previous Topic:A problem with model transformations with element deletions on dependent models
Next Topic:loading ETL model in Sample Reflective Editor
Goto Forum:
  


Current Time: Thu Apr 25 00:58:59 GMT 2024

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

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

Back to the top