MWE: delay issue with mwe invoked from Eclipse' action [message #816807] |
Fri, 09 March 2012 04:28  |
Eclipse User |
|
|
|
Hello,
I'm playing with mwe/xpand in an attempt to generate simple xsd from ecore. The thing is working well already when invoked from Eclipse (right-click on xsd.mwe and executing it as a MWE Workflow).
My problem is that I've made a plugin which provides an action which invokes this xsd workflow on a selected ecore file. The problem is that the action is invoked, workflow is started but then it halts for about 2 minutes and then continues. During 2 minutes halt I don't see any huge memory allocations, or heavilly reading from disk or a lot of CPU consumption. Nothing. It (eclipse process) shows just very little activity at all. My code from action looks (f is selected IFile):
mon.subTask("Generate XML Schema for " + f.getName() + " model ...");
IPath model_path = f.getFullPath();
String wfFile = "workflow/xsd.mwe";
Map<String, String> properties = new HashMap<String, String>();
IPath src_gen = f.getParent().getLocation();
properties.put("src-gen", src_gen.toString());
properties.put("model", model_path.toString());
StringTokenizer tok = new StringTokenizer(f.getName(), ".");
String name = tok.nextToken();
String xsdFileName = name + ".xsd";
properties.put("xsdFileName", xsdFileName);
Map slotContents = new HashMap();
WorkflowRunner wrun = new WorkflowRunner();
wrun.run(wfFile , null, properties, slotContents);
f.getParent().refreshLocal(1, null);
I've stripped debug messages out. The output of workflow run invoked by this action then looks:
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO: --------------------------------------------------------------------------------------
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO: EMF Modeling Workflow Engine 1.1.1, Build v201108020506
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO: (c) 2005-2009 openarchitectureware.org and contributors
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO: --------------------------------------------------------------------------------------
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO: running workflow: workflow/xsd.mwe
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.core.WorkflowEngine prepare
INFO:
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.utils.StandaloneSetup setPlatformUri
INFO: Registering platform uri '/export/home/karel/usr/local'
Mar 8, 2012 8:51:57 PM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Reader: Loading model from platform:/resource//testECoreToXWiki/model2/rocket3.ecore
Mar 8, 2012 8:51:57 PM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: CheckComponent: slot model check file(s): metamodel::Checks
Mar 8, 2012 8:52:01 PM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Generator: generating 'template::ecore2xsd::main FOR model' => /export/home/karel/runtime-EclipseApplication/testECoreToXWiki/model2
Mar 8, 2012 8:52:01 PM org.eclipse.xpand2.output.XmlBeautifier beforeWriteAndClose
SEVERE: Use the XmlBeautifier from XSD Feature: org.eclipse.xtend.typesystem.xsd.XMLBeautifier instead.
Mar 8, 2012 8:52:01 PM org.eclipse.xpand2.Generator invokeInternal2
INFO: Written 1 files to outlet [default](/export/home/karel/runtime-EclipseApplication/testECoreToXWiki/model2)
Mar 8, 2012 8:52:01 PM org.eclipse.emf.mwe.core.WorkflowEngine executeWorkflow
INFO: workflow completed in 3854ms!
Please see especially timing on those two lines:
Mar 8, 2012 8:49:46 PM org.eclipse.emf.mwe.utils.StandaloneSetup setPlatformUri
INFO: Registering platform uri '/export/home/karel/usr/local'
Mar 8, 2012 8:51:57 PM org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
My question is: is this a know issue? If so, then is there any known fix or workaround for this. If not, then is there any way how to turn more verbose debugging on workflow so I can see more messages from it and judge better where it halts for those 2 minutes?
Thanks!
Karel
|
|
|
|
|
|
Re: MWE: delay issue with mwe invoked from Eclipse' action [message #817159 is a reply to message #817107] |
Fri, 09 March 2012 13:19  |
Eclipse User |
|
|
|
Hi
A bug in MWE has just been fixed whereby running a specific script
searched everywhere to find it.
There are too many places in Eclipse Modeling projects where a total
scan of the EPackage Registry loads everything in sight. Generally any
project that tries to be helpful with a 'global' model index can be very
unhelpful performance-wise since the cost of building that helpful index
is huge and sometimes the cost of maintaining it is also huge.
A Bug in EGIT has also been fixed whereby it triggered a built at every
possible opportunity causing numerous nested rebuilds.
Regards
Ed Willink
On 09/03/2012 16:42, Karel Gardas wrote:
> Hi Karsten,
> you are right! My ~/usr/local is full of various Eclipse installations
> and other Java software. Thanks to your suggestion I've been able to
> hack my xsd.mwe to set better StandaloneSetup path and now everything
> is working as expected!
> Thanks,
> Karel
|
|
|
Powered by
FUDForum. Page generated in 0.05181 seconds