Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] Performance
[Epsilon] Performance [message #378266] Thu, 21 June 2007 08:33 Go to next message
Aleksander Bandelj is currently offline Aleksander Bandelj
Messages: 98
Registered: July 2009
Member
Epsilon is quite slow on large models. Reason seems not to lie in
language interpreter itself, but in model access. Major cause is name
lookup in NameExecutor#execute. Every variable access first looks for
model elements (slow) only then in current variable scope. Looking up
variable first speeds things up by incredible amount. I wouldn't mind
variable-first semantics. Current (model-first) one should be enforced
by checking for name shadowing conflict before interpretation.

Another proposal: it would be nice that empty name model access always
accesses first registered model, even if more than one model is
registered. This way, scripts written for processing of single model
would still work on multiple model resource sets (I have several use
cases for this). This would also resembe how EMF editors work (first
resource is active one). It's a simple change in
EolModelRepository#getModelByName

-a
Re: [Epsilon] Performance [message #378267 is a reply to message #378266] Thu, 21 June 2007 09:41 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Aleksander,

Thanks for your insightful comments. Comments below:

Aleksander Bandelj wrote:
> Epsilon is quite slow on large models. Reason seems not to lie in
> language interpreter itself, but in model access. Major cause is name
> lookup in NameExecutor#execute. Every variable access first looks for
> model elements (slow) only then in current variable scope. Looking up
> variable first speeds things up by incredible amount. I wouldn't mind
> variable-first semantics. Current (model-first) one should be enforced
> by checking for name shadowing conflict before interpretation.

I've fixed this. Now it checks for a model element type first only if
the name includes a "!".

>
> Another proposal: it would be nice that empty name model access always
> accesses first registered model, even if more than one model is
> registered. This way, scripts written for processing of single model
> would still work on multiple model resource sets (I have several use
> cases for this). This would also resembe how EMF editors work (first
> resource is active one). It's a simple change in
> EolModelRepository#getModelByName
>

I can see this one introducing some confusion :) but I think the
trade-off is good so I've also fixed it.

A cleaner approach for future versions would be to enable dynamic
activation/deactivation of models by adding respective methods to the
EolModel class :

DB.activate();
Table.allInstances.println();
UML.activate(); -- Activates UML, deactivates DB
Class.allInstances.println();

> -a

Cheers,
Dimitrios
Re: [Epsilon] Performance [message #602078 is a reply to message #378266] Thu, 21 June 2007 09:41 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Aleksander,

Thanks for your insightful comments. Comments below:

Aleksander Bandelj wrote:
> Epsilon is quite slow on large models. Reason seems not to lie in
> language interpreter itself, but in model access. Major cause is name
> lookup in NameExecutor#execute. Every variable access first looks for
> model elements (slow) only then in current variable scope. Looking up
> variable first speeds things up by incredible amount. I wouldn't mind
> variable-first semantics. Current (model-first) one should be enforced
> by checking for name shadowing conflict before interpretation.

I've fixed this. Now it checks for a model element type first only if
the name includes a "!".

>
> Another proposal: it would be nice that empty name model access always
> accesses first registered model, even if more than one model is
> registered. This way, scripts written for processing of single model
> would still work on multiple model resource sets (I have several use
> cases for this). This would also resembe how EMF editors work (first
> resource is active one). It's a simple change in
> EolModelRepository#getModelByName
>

I can see this one introducing some confusion :) but I think the
trade-off is good so I've also fixed it.

A cleaner approach for future versions would be to enable dynamic
activation/deactivation of models by adding respective methods to the
EolModel class :

DB.activate();
Table.allInstances.println();
UML.activate(); -- Activates UML, deactivates DB
Class.allInstances.println();

> -a

Cheers,
Dimitrios
Previous Topic:[Epsilon] Performance
Next Topic:[TCS]TCS-Importer.jar that works with ATL CVSHEAD?
Goto Forum:
  


Current Time: Thu Oct 02 04:42:33 GMT 2014

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

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