As I develop a generator with Xtext, I'm curious about options to reduce
the resource requirements. One thing that seems expensive in my scenario
is initializing the workflow for each model file. My project has several
thousand model files, so it looks like significant time may go into
initializing the MWE workflow.
Since I'm running the process from a Java application that is already
invoking the parser directly (through XtextResourceSet), I wonder if there
is a reasonable API to invoke the Xpand without starting an MWE Workflow.
What I'm not clear on is how I may provide the the instance with the model
instance that will drive template expansion. I see
org.eclipse.xpand2.XpandFacade, but its JavaDoc is bare and searches don't
yield any apparently useful references.