eclipse / epsilon

Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
https://eclipse.org/epsilon
Eclipse Public License 2.0
55 stars 11 forks source link

TransformationTrace: use map->map->list data structure instead of flat list #44

Closed agarciadom closed 1 year ago

agarciadom commented 1 year ago

This PR changes TransformationTrace so it uses a map-map-list data structure (source -> rule -> transformations) instead of a flat list of Transformations. It uses LinkedHashMaps to preserve order (needed to pass the OO2DB test).

Performance improved for the largest of the four KMEHR to FHIR models, going from 188.56s to 82.68s:

image

One detail is that I changed the signature of the getTransformationTargets method a bit, from this:

public Collection<?> getTransformationTargets(Object source, String ruleName)

To this:

public Collection<?> getTransformationTargets(Object source, TransformationRule rule)

It only seemed to be used from a single place in our codebase, and we are passing all tests in Jenkins. I have also run the normal and plugged-in tests from Eclipse.