Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Compile Ecore
Compile Ecore [message #804459] Wed, 22 February 2012 16:47 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

i am creating Ecore model programatically and also instantiating it many times to create models.

I have experienced that setting delegates can be slow as they are not thread safe. So i wonder can i compile Ecore programatically and use compiled version so when i instantiate it to create model then performance gets better and it takes less time?

Cheers!
Re: Compile Ecore [message #804495 is a reply to message #804459] Wed, 22 February 2012 17:39 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Slow and thread safe are different issues.

Juno has a direct OCL to Java compiler that seems to get a lot of things
right but I have some nagging doubts to resolve about some type expressions.

So if you're happy with experimental code download Eclipse 3/8M5 or
4.2M5 and then install OCL 4.0.0M5.

Benchmarks so far show that the code executes two to fives faster
despite doing accurate polymorphic dispatch with greater arithmetic
precision. Once I'm happy that it works, an analysis of final calls
should allow further substantial speedups. Of course compilation occurs
at compile time so there are only Java JIT overheads for a first execution.

The new code has not been considered from a thread safety perspective.
Most of it is all simple stack access, so I suspect that if you make
sure that you use a distinct MetaModelManager per thread (inefficient)
or warm up a shared MetaModelManager to have all relevant type
specialisations you're probably alright. You can probably create a
derived MetaModelManager that synchronizes critical meta-model evolution
methods.

Regards

Ed Willink


On 22/02/2012 16:47, ModelGeek Mising name wrote:
> Hi,
>
> i am creating Ecore model programatically and also instantiating it
> many times to create models.
>
> I have experienced that setting delegates can be slow as they are not
> thread safe. So i wonder can i compile Ecore programatically and use
> compiled version so when i instantiate it to create model then
> performance gets better and it takes less time?
>
> Cheers!
Previous Topic:Implicit collect() flattening and OCLInEcore expression rewrite
Next Topic:Null pointer exception problem with OCL parsing
Goto Forum:
  


Current Time: Fri Apr 19 22:48:23 GMT 2024

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

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

Back to the top