Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Increase transformation performance
[ATL] Increase transformation performance [message #50933] Fri, 06 July 2007 09:36 Go to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi all,

I'm working on a transformation of a business process model to another.
The models to transform could get quite big, so I'm looking for some
ways to increase the performance of my transformation.
In the manual i read, that attributes are computed once only. Does this
mean if I call an attribute-helper in the context of a source model
element the result is computed at the first time I call this attribute?
As the source models element could not be change the result of the
helper (regardless if attribute or not) should always be the same.
If this is right, I would use attributes to implement 'statement' about
source model elements (e. g. 'isActivity', 'hasSuccessor') to increase
performance. Please, correct me if I'm wrong.

Are there any other 'tricks' to get a better performance?

Thanks and Greets

Erik
Re: [ATL] Increase transformation performance [message #50989 is a reply to message #50933] Fri, 06 July 2007 11:21 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi Erik,

> I'm working on a transformation of a business process model to another.
> The models to transform could get quite big, so I'm looking for some
> ways to increase the performance of my transformation.
> In the manual i read, that attributes are computed once only. Does this
> mean if I call an attribute-helper in the context of a source model
> element the result is computed at the first time I call this attribute?
> As the source models element could not be change the result of the
> helper (regardless if attribute or not) should always be the same.
> If this is right, I would use attributes to implement 'statement' about
> source model elements (e. g. 'isActivity', 'hasSuccessor') to increase
> performance. Please, correct me if I'm wrong.

You are right ;-).


> Are there any other 'tricks' to get a better performance?

Yes, there are some tricks, but they depend on your transformation
scenario. It is difficult for me to tell you more without knowing about it.



Best regards,

Frédéric Jouault
Re: [ATL] Increase transformation performance [message #51664 is a reply to message #50989] Mon, 09 July 2007 13:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hello Frédéric,

What do you need to know? I'm doing a XML to XML transformation of a
workflow model with ATL and have often to use statement to check if a
element (representing activities, events, participants etc.) fulfill a
characteristic or not (e. g.)
At the moment I use helper (not attributes) to implement these
statement. Would it be better (and still work) if I use attributes
instead helpers?
I tried to avoid 'allInstances()' calls are there any other functions /
operation or rules which should be used carefully with respect to
peformance issues?

Greets

Erik

Frédéric Jouault schrieb:
> Hi Erik,
>
> Yes, there are some tricks, but they depend on your transformation
> scenario. It is difficult for me to tell you more without knowing about it.
>
>
>
> Best regards,
>
> Frédéric Jouault
Re: [ATL] Increase transformation performance [message #51807 is a reply to message #51664] Tue, 10 July 2007 12:37 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi Eric,

Yes, using attribute helpers instead of operation helpers can
significantly improve performance because their results are cached.
However, this depends on whether you access several times the same
feature of a given element or not.

Avoiding allInstances() is definitely a good thing.

Using rule inheritance may also help because this reduces the number of
calls to allInstances() generated by the compiler.


Note that doing a semantic transformation at the XML level typically
reduces performance because you cannot rely on types for matching, but
usually match XML!Element with a guard.


Regards,

Frédéric Jouault


Erik Becker wrote:
> Hello Frédéric,
>
> What do you need to know? I'm doing a XML to XML transformation of a
> workflow model with ATL and have often to use statement to check if a
> element (representing activities, events, participants etc.) fulfill a
> characteristic or not (e. g.)
> At the moment I use helper (not attributes) to implement these
> statement. Would it be better (and still work) if I use attributes
> instead helpers?
> I tried to avoid 'allInstances()' calls are there any other functions /
> operation or rules which should be used carefully with respect to
> peformance issues?
>
> Greets
>
> Erik
>
> Frédéric Jouault schrieb:
>> Hi Erik,
>>
>> Yes, there are some tricks, but they depend on your transformation
>> scenario. It is difficult for me to tell you more without knowing
>> about it.
>>
>>
>>
>> Best regards,
>>
>> Frédéric Jouault
Re: [ATL] Increase transformation performance [message #51908 is a reply to message #51807] Tue, 10 July 2007 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi Frédéric,
I have to call some of the helpers several times on the same element
(context), so I think it will increase performance if its cached.
Are the results cached for each model element (context)?

Thanks for your advice concerning using ATL for XML transformation. T
totally agree, that using another meta model to transform my models
would be a better way, but with respect time and effort I've to do it
this 'dirty' way. I saves me to write 2 meta model (source and target)
and 2 transformations (xml -> source and target -> xml).

Regards

Erik

Frédéric Jouault schrieb:
> Yes, using attribute helpers instead of operation helpers can
> significantly improve performance because their results are cached.
> However, this depends on whether you access several times the same
> feature of a given element or not.
> Avoiding allInstances() is definitely a good thing.
>
> Using rule inheritance may also help because this reduces the number of
> calls to allInstances() generated by the compiler.
>
>
> Note that doing a semantic transformation at the XML level typically
> reduces performance because you cannot rely on types for matching, but
> usually match XML!Element with a guard.
>
>
> Regards,
>
> Frédéric Jouault
>
>
> Erik Becker wrote:
>> Hello Frédéric,
>>
>> What do you need to know? I'm doing a XML to XML transformation of a
>> workflow model with ATL and have often to use statement to check if a
>> element (representing activities, events, participants etc.) fulfill a
>> characteristic or not (e. g.)
>> At the moment I use helper (not attributes) to implement these
>> statement. Would it be better (and still work) if I use attributes
>> instead helpers?
>> I tried to avoid 'allInstances()' calls are there any other functions
>> / operation or rules which should be used carefully with respect to
>> peformance issues?
>>
>> Greets
>>
>> Erik
>>
>> Frédéric Jouault schrieb:
>>> Hi Erik,
>>>
>>> Yes, there are some tricks, but they depend on your transformation
>>> scenario. It is difficult for me to tell you more without knowing
>>> about it.
>>>
>>>
>>>
>>> Best regards,
>>>
>>> Frédéric Jouault
Re: [ATL] Increase transformation performance [message #51961 is a reply to message #51908] Wed, 11 July 2007 08:22 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi Erik,

> I have to call some of the helpers several times on the same element
> (context), so I think it will increase performance if its cached.
> Are the results cached for each model element (context)?

Yes, they are.


> Thanks for your advice concerning using ATL for XML transformation. T
> totally agree, that using another meta model to transform my models
> would be a better way, but with respect time and effort I've to do it
> this 'dirty' way. I saves me to write 2 meta model (source and target)
> and 2 transformations (xml -> source and target -> xml).

Personally, I would write the 2 metamodels even if I had no performance
issue ;-).


Regards,

Frédéric Jouault
Re: [ATL] Increase transformation performance [message #52014 is a reply to message #51961] Wed, 11 July 2007 10:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi Frédéric,

> > Thanks for your advice concerning using ATL for XML transformation. T
> > totally agree, that using another meta model to transform my models
> > would be a better way, but with respect time and effort I've to do it
> > this 'dirty' way. I saves me to write 2 meta model (source and target)
> > and 2 transformations (xml -> source and target -> xml).
>
> Personally, I would write the 2 metamodels even if I had no performance
> issue ;-).
>

Be sure I will do it next time, but now there's no time for this. ;-)

My performence did dramatically increase as I made some helpers from
operations to attributes (features). In my case It reduced the runtime
to about 30% of the time before the change.

Unfortunately I've now to change my module structure because the helpers
now have to be in the module and not in the libraries.
Is it possible to put rules from the (main) module in the libraries?
My main module is quite complex and I would like to separate the rules
and helper concerning their purpose to reduce the complexity.

In your last posting You wrote something about rule inheritance. Where
can I find info on that?

Greets

Erik
Re: [ATL] Increase transformation performance [message #52120 is a reply to message #52014] Wed, 11 July 2007 15:25 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi Erik,

>> > Thanks for your advice concerning using ATL for XML transformation. T
>> > totally agree, that using another meta model to transform my models
>> > would be a better way, but with respect time and effort I've to do it
>> > this 'dirty' way. I saves me to write 2 meta model (source and
target)
>> > and 2 transformations (xml -> source and target -> xml).
>>
>> Personally, I would write the 2 metamodels even if I had no
>> performance issue ;-).
>>
>
> Be sure I will do it next time, but now there's no time for this. ;-)

;-)


> My performence did dramatically increase as I made some helpers from
> operations to attributes (features). In my case It reduced the runtime
> to about 30% of the time before the change.

That is definitely nice :-).


> Unfortunately I've now to change my module structure because the helpers
> now have to be in the module and not in the libraries.
> Is it possible to put rules from the (main) module in the libraries?
> My main module is quite complex and I would like to separate the rules
> and helper concerning their purpose to reduce the complexity.

You should be able to use attribute helpers in libraries, provided you
compile them with the ATL 2006 compiler (i.e., not with the ATL 2004
compiler), and you use a recent version of the VM.


> In your last posting You wrote something about rule inheritance. Where
> can I find info on that?

There is some information about rule inheritance on the wiki:
http://wiki.eclipse.org/ATL_Language_Troubleshooter#Rule_inh eritance

feel free to improve it if necessary ;-).


Best regards,

Frédéric Jouault
Previous Topic:[ATL]: Create 'thisModule' VariableExp in ATL model
Next Topic:[ATL] Executing ATL transformations by using ANT scripts: profiled models
Goto Forum:
  


Current Time: Sat Apr 20 02:06:37 GMT 2024

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

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

Back to the top