eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[qvti] Improve opposite caches #206

Closed eclipse-qvtd-bot closed 17 hours ago

eclipse-qvtd-bot commented 17 hours ago

| --- | --- | | Bugzilla Link | 501648 | | Status | RESOLVED DUPLICATE of bug 507391 | | Importance | P3 normal | | Reported | Sep 18, 2016 05:20 EDT | | Modified | Nov 11, 2016 04:24 EDT | | Reporter | Ed Willink |

Description

The current interpreted execution of unnavigable opposites first looks up a cacheIndex using a Map, null for uncached, then looks up the opposite using another Map.

Multiple maps are slightly wasteful.

Now that QVTi is a distinct non-OMG AS, the needs-cache status can be a 'derived' property directly in the AST. A single Map can then be used for all opposites.

But a Map incurs a 60 byte overhead.

Much much better to use non-standard objects in which all necessary properties are reified. This will benefit both CG and Interpreted execution.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Oct 05, 2016 05:22

(In reply to Ed Willink from comment #0)

Much much better to use non-standard objects in which all necessary properties are reified. This will benefit both CG and Interpreted execution.

Bug 503405 suggests a much simpler solution that can easily be done in the short term using semi-standard objects.

Fully custom objects can wait for another Bugzilla and another day.

This bug has been marked as a duplicate of bug 503405

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Oct 05, 2016 14:42

From Bug 503405 whose simpler solution doesn't work.

To get better performance we need to create a SlottedEObject with an Object array and one slot index per required property and opposite. The indexes can be maintained by SlottedEStructuralFeatures in the SlottedEClass after scheduling and we have no nsURI problems because we don't generate any Java models for the CG implementation; we don't even need to genmodel the middle model; the *.ecore.oclas might be enough.

Implementing the SlottedEObject optimization near QVTs2QVTi ensures that it is available for all QVTs generators. Extended source / target models would only help QVTr transformations.

eclipse-qvtd-bot commented 17 hours ago

By Ed Willink on Nov 11, 2016 04:24

See Bug 507391.

This bug has been marked as a duplicate of bug 507391