The answer to the first has always been and will remain the same : Acceleo is an implementation of the OMG's MOFM2T 1.0 specification, and this specification tells us that
- A query is required to produce the same result each time it is invoked with the same arguments.
The answer to the second, however, changes with the 3.1.0 release of Acceleo : even though we strive to be as close as possible to the specification, there are times where this caching of the query return values is not desirable : it can be really costly memory-wise, it could be a call to a Java method that has random results, it could be a query which return value changes according to variable states that are not passed as parameters... That was possible through programmatic calls in 3.0.2, but we've decided to make that preference available through the UI in 3.1.0 :
The next step is to have the specification evolve in order to be able to disable the query cache "per-query" instead of globally but... that's another story :).
Hi,
ReplyDeletewhat are using to make the query?
EMFQuery? EMFQuery2? another things?
Do you have benchmark
Regards,
A quick comment on the UI. The label of a checkbox should indicate what the checked state means, while here they indicate an action. I suggest rephrasing to "Cache the evaluation of queries" or "Use query evaluation cache", and similar for the other checkbox.
ReplyDeleteHi,
ReplyDeletewouldn't introducing an annotation to disable the caching of a particular query be a better solution? As opposed to the global preference approach?
Kind regards,
Niels Brouwers.
@scratsh : Acceleo is a model to text tool implementing an OMG specification, with its own syntax and semantics. "Query" in the Acceleo syntax is an OCL expression, coded in Java; neither EMF Query or EMF Query2, but our own implementation of our specification.
ReplyDelete@Hallvard : We have hover popups to better indicate what each checkbox means, but indeed your rephrasing propositions seem better that our long labels... These will probably be rephrased in 3.1.1 :).
ReplyDelete@Niels : Enabling the query through either an annotation or a custom syntax element is our goal and what we hope to have, ultimately. Yet we'd like to make the OMG specification evolve before we introduce such a change in the syntax.
ReplyDelete