vitorsouza/Zanshin — Issue #9: Improve performance of adaptation algorithms
Author: vitorsouza
Created: 2012-02-29 17:35:43+00:00
State: open
Labels: Improvement

Some operations are repeated in many procedures, e.g.:
* Find the goal model given the AwReq;
* Find relations that refer to a given AwReq;
* Check if a parameter is incrementable.

In particular, in `SimpleValueCalculationProcedure` and `SimpleParameterChangeProcedure` there is a nested loop: for each of the N params to increment, loop all relations to find the appropriate one in order to check bounds, etc. This makes the overall algorithm be O(amount-of-parameters-chosen x number-of-relations-in-model). Study a way to avoid this.

One early idea is to delegate some of these operations to the repository service instead of having them in the EMF classes as they are now. This would allow for the creation of maps when the model is registered, as the case with other elements such as goals, tasks, AwReqs, etc.