[XPand/MWE] MWE runs quite slow, since upgrade to latest version of Xpand/Xtext [message #690354] |
Wed, 29 June 2011 12:20 |
Marten Sijtema Messages: 67 Registered: November 2009 |
Member |
|
|
Hello, when running my MWE workflow that generates Java from a model, it is quite slow. Slower than it was before, I just upgraded the XPand and XText plugins.
Particularly it hangs for a long while on this bit: 'Registering platform uri '/Users/me/Work/EclipseWorkspaces'
0 INFO WorkflowEngine - --------------------------------------------------------------------------------------
27 INFO WorkflowEngine - EMF Modeling Workflow Engine 1.1.0, Build v201106070424
28 INFO WorkflowEngine - (c) 2005-2009 openarchitectureware.org and contributors
28 INFO WorkflowEngine - --------------------------------------------------------------------------------------
29 INFO WorkflowEngine - running workflow: /Users/marten/Work/EclipseWorkspaces/gwt2java/src/workflow/MyProject/generator.mwe
29 INFO WorkflowEngine -
1714 INFO StandaloneSetup - Registering platform uri '/Users/me/Work/EclipseWorkspaces'
137997 INFO StandaloneSetup - Adding dynamic EPackage 'http://gwt/1.0' from 'platform:/resource/ecore2gwt/metamodels/gwt/gwt.ecore'
138299 INFO CompositeComponent - Reader: Loading model from platform:/resource/gwt2java/src/Technicom/featuresEnabled.ecore
138492 INFO CompositeComponent - Generator: generating 'template::Main::main FOREACH model' => Technicom-src-gen
140872 INFO ProtectedRegionResolverImpl - Source scan started ...
Is the new version doing some sort of directory scan or something? How could this waiting time be reduced? Is my classpath to 'big'? Does that matter?
Because if you see the numbers in the log above, it hangs for about 2 minutes!
Hints would be appreciated. Other than this slow thing, it works fine.
My company: Sytematic, building business software from models.
|
|
|
|
Re: [XPand/MWE] MWE runs quite slow, since upgrade to latest version of Xpand/Xtext [message #690386 is a reply to message #690369] |
Wed, 29 June 2011 13:08 |
Marten Sijtema Messages: 67 Registered: November 2009 |
Member |
|
|
Or maybe change the way I run things? Because I just register one metamodel, load one model, and convert it to Java using XPand templates.
This is my current workflow (to be sure I am not doing something 'uncommon')
I am actually not sure if I need to use the StandAlone setup! Always running it from Eclipse anyways!
What is the recommended way of running such a workflow if standalone is not necessary??
<?xml version="1.0"?>
<workflow>
<property name="projectName" value="Technicom" />
<property name="model" value="gwt2java/src/${projectName}/featuresEnabled.ecore" />
<property name="src-gen" value="${projectName}-src-gen" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
<registerEcoreFile value="platform:/resource/ecore2gwt/metamodels/gwt/gwt.ecore" />
</bean>
<!-- clean the src-gen directory
**** WARNING: uncommenting next line also cleans custom code in PROTECTED Regions! ****
-->
<!-- <component class="org.eclipse.emf.mwe.utils.DirectoryCleaner" directory="src-gen"/> -->
<!-- load model and store it in slot 'model' -->
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="platform:/resource/${model}" />
<firstElementOnly value="false" />
<modelSlot value="model" />
</component>
<!-- check model -->
<!--
<component class="org.eclipse.xtend.check.CheckComponent">
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<checkFile value="metamodel::Checks" />
<emfAllChildrenSlot value="model"/>
</component>
-->
<!-- generate main code, starts up Main.xpt, which calls/starts all the other templates -->
<component class="org.eclipse.xpand2.Generator">
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel" >
</metaModel>
<prSrcPaths value="${src-gen}"/>
<prDefaultExcludes value="true"/>
<!--<prExcludes value="*.xml"/>-->
<fileEncoding value="UTF-8"/>
<!-- as in model from <modelSlot value="model" />, shown above -->
<expand value="template::Main::main FOREACH model" />
<outlet path="${src-gen}" >
<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
</outlet>
</component>
<!-- generate XML files, this is postprocessed with a Xml Beautifier. This can be downloaded at:
http://sourceforge.net/projects/fornax/files/utilities-formatter-xml/ (get latest version)
Following this, add this jar, and the dependencies of it (in the /lib/ dir of the fornax dir)
to the build path of the gwtCode.generator.project project.
Warning: if you generated badly formatted XML code, this will fall over it. Generate valid code!
-->
<component class="org.eclipse.xpand2.Generator">
<metaModel id="mm" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel" >
</metaModel>
<prSrcPaths value="${src-gen}"/>
<prDefaultExcludes value="true"/>
<!--<prExcludes value="*.xml"/>-->
<fileEncoding value="UTF-8"/>
<!-- as in model from <modelSlot value="model" />, shown above -->
<expand value="template::war::Main::xmls FOREACH model" />
<outlet path="${src-gen}" >
<postprocessor class="org.fornax.utilities.formatter.xml.XmlFormatter" />
</outlet>
</component>
</workflow>
[Updated on: Wed, 29 June 2011 13:10] Report message to a moderator
|
|
|
|
|
Re: [XPand/MWE] MWE runs quite slow, since upgrade to latest version of Xpand/Xtext [message #690403 is a reply to message #690399] |
Wed, 29 June 2011 13:27 |
Marten Sijtema Messages: 67 Registered: November 2009 |
Member |
|
|
I fixed it using standalonesetup, by putting the dir not to '..', because that workspace dir is pretty large. Limited it to the current project, and it 's quick again!
<property name="model" value="gwt2java/src/${projectName}/featuresEnabled.ecore" />
<property name="src-gen" value="${projectName}-src-gen" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value="."/> <!-- ******* this was changed from '..' to '.' -->
<registerEcoreFile value="src/metamodel/gwt.ecore" />
</bean>
My company: Sytematic, building business software from models.
|
|
|
Powered by
FUDForum. Page generated in 0.02845 seconds