Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » EMF model generation- performance problem?
| EMF model generation- performance problem? [message #99212] |
Tue, 16 October 2007 06:55  |
Eclipse User |
|
|
|
Hi,
Using Europa with both JDK 5 and also separately 6.
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB of
RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours. This
is after checking the "Create XML Schema to ECore map" checkbox and
clicking Finish button. I am also running it on a separate desktop with
dual Opterons, 4GB RAM and RAID5, it cannot even redraw the Eclipse UI,
with one cpu at 100%.
So is this expected or is there something wrong?
Thanks,
David
|
|
| |
| Re: EMF model generation- performance problem? [message #99424 is a reply to message #99230] |
Wed, 17 October 2007 09:04   |
Eclipse User |
|
|
|
Hi,
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
Severity and Description Path Resource Location Creation Time Id
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
Thx.
David
Ed Merks wrote:
> David,
>
> Sixteen hours is a little long. =-O It's a really bad idea to use
> "Create XML Schema to Ecore map" for anything but a toy schema example.
> I know that this feature has some very bad combinatorial behavior so I
> suggest you avoid using it. The generation process doesn't rely on it
> and should proceed a 1000 times faster without it.
>
>
> david wrote:
>> Hi,
>>
>> Using Europa with both JDK 5 and also separately 6.
>>
>> I am using the tutorial in the help for "Generating an EMF model using
>> XML Schema (XSD)". But instead of using the library.xsd I am using a
>> large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
>> of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it
>> is using all of it, it has been using 100% of 1 core now for 16 hours.
>> This is after checking the "Create XML Schema to ECore map" checkbox
>> and clicking Finish button. I am also running it on a separate desktop
>> with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
>> Eclipse UI, with one cpu at 100%.
>>
>> So is this expected or is there something wrong?
>>
>> Thanks,
>>
>> David
|
|
|
| Re: EMF model generation- performance problem? [message #99450 is a reply to message #99424] |
Wed, 17 October 2007 09:46   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------040303050908090602040406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
deleting these two files and regenerating will fix the problem. I'm
slightly confused though, if there is an org.mddl.mddl._3.impl package
containing classes, are you saying there isn't really an
org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
containing classes? I would expect the former to contain all the
interfaces and the later to contain things like the XyzSwitch for the
model...
david wrote:
> Hi,
>
> I tried again to get to first base, following the library example but
> using a much larger xsd. I get further but an error.
>
> Severity and Description Path Resource Location Creation
> Time Id
> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
> Package 'org.mddl.mddl._3' does not exist in this plug-in
> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>
> This is after right clicking the genmodel and selecting 'Generate
> All'. Unfortunately the xsd has a rather unfortunately named element
> '_3' not sure this has anything to do with this problem, but it may.
> It does not show an error on the Export Package of
> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>
> Thx.
>
> David
>
> Ed Merks wrote:
>> David,
>>
>> Sixteen hours is a little long. =-O It's a really bad idea to use
>> "Create XML Schema to Ecore map" for anything but a toy schema
>> example. I know that this feature has some very bad combinatorial
>> behavior so I suggest you avoid using it. The generation process
>> doesn't rely on it and should proceed a 1000 times faster without it.
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> Using Europa with both JDK 5 and also separately 6.
>>>
>>> I am using the tutorial in the help for "Generating an EMF model
>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>> now for 16 hours. This is after checking the "Create XML Schema to
>>> ECore map" checkbox and clicking Finish button. I am also running it
>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>
>>> So is this expected or is there something wrong?
>>>
>>> Thanks,
>>>
>>> David
--------------040303050908090602040406
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model <a name="b150092"
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092">150092</a>,
so perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...<br>
<br>
<br>
david wrote:
<blockquote cite="mid:ff517h$d5g$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------040303050908090602040406--
|
|
|
| Re: EMF model generation- performance problem? [message #99479 is a reply to message #99450] |
Wed, 17 October 2007 10:11   |
Eclipse User |
|
|
|
Well I tried generating them one at a time, model, edit etc. and that
worked. Now I have 142 of this type of error one per java file.
Cannot cast from EList<Object> to FeatureMap
MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
1192626673906 36704
I googled it and only found one reference to this error type and it was
in the context of OHF, with which I am unfamiliar.
Thx.
David
Ed Merks wrote:
> David,
>
> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
> you make changes to the model 150092
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
> deleting these two files and regenerating will fix the problem. I'm
> slightly confused though, if there is an org.mddl.mddl._3.impl package
> containing classes, are you saying there isn't really an
> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
> containing classes? I would expect the former to contain all the
> interfaces and the later to contain things like the XyzSwitch for the
> model...
>
>
> david wrote:
>> Hi,
>>
>> I tried again to get to first base, following the library example but
>> using a much larger xsd. I get further but an error.
>>
>> Severity and Description Path Resource Location Creation
>> Time Id
>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>
>> This is after right clicking the genmodel and selecting 'Generate
>> All'. Unfortunately the xsd has a rather unfortunately named element
>> '_3' not sure this has anything to do with this problem, but it may.
>> It does not show an error on the Export Package of
>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>
>> Thx.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>> example. I know that this feature has some very bad combinatorial
>>> behavior so I suggest you avoid using it. The generation process
>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Using Europa with both JDK 5 and also separately 6.
>>>>
>>>> I am using the tutorial in the help for "Generating an EMF model
>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>>> now for 16 hours. This is after checking the "Create XML Schema to
>>>> ECore map" checkbox and clicking Finish button. I am also running it
>>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>>
>>>> So is this expected or is there something wrong?
>>>>
>>>> Thanks,
>>>>
>>>> David
>
|
|
|
| Re: EMF model generation- performance problem? [message #99495 is a reply to message #99479] |
Wed, 17 October 2007 10:25   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------010900090802060303080003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
This error is an annoying one. It sounds like you've generated code
that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
to 1.4), but are compiling with Java 5.0 source compatibility. You'll
need to change them to match. I would generally expect this code in
ModelImporter.java to ensure that the new GenModel's Compliance Level
matches your preferences:
protected void adjustGenModel(Monitor monitor)
{
String modelName =
URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
int index = modelName.lastIndexOf('.');
if (index != -1)
{
modelName = modelName.substring(0, index);
}
modelName = CodeGenUtil.capName(modelName);
GenModel genModel = getGenModel();
genModel.setModelName(modelName);
genModel.setModelPluginID(getModelPluginID());
genModel.setModelDirectory(getModelPluginDirectory());
genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
if (getOriginalGenModel() == null)
{
URI genModelURI = genModel.eResource().getURI();
if (genModelURI.isPlatformResource())
{
IFile genModelFile =
ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(genModelURI.toPlatformString(true)));
IProject project = genModelFile.getProject();
String complianceLevel =
CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
if ("1.5".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
}
else if ("1.6".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
}
else if ("1.4".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
}
}
}
}
david wrote:
> Well I tried generating them one at a time, model, edit etc. and that
> worked. Now I have 142 of this type of error one per java file.
>
> Cannot cast from EList<Object> to FeatureMap
> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
> 1192626673906 36704
>
> I googled it and only found one reference to this error type and it
> was in the context of OHF, with which I am unfamiliar.
>
> Thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>> you make changes to the model 150092
>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>> deleting these two files and regenerating will fix the problem. I'm
>> slightly confused though, if there is an org.mddl.mddl._3.impl
>> package containing classes, are you saying there isn't really an
>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>> containing classes? I would expect the former to contain all the
>> interfaces and the later to contain things like the XyzSwitch for the
>> model...
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> I tried again to get to first base, following the library example
>>> but using a much larger xsd. I get further but an error.
>>>
>>> Severity and Description Path Resource Location Creation
>>> Time Id
>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>
>>> This is after right clicking the genmodel and selecting 'Generate
>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>> '_3' not sure this has anything to do with this problem, but it may.
>>> It does not show an error on the Export Package of
>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>
>>> Thx.
>>>
>>> David
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>> example. I know that this feature has some very bad combinatorial
>>>> behavior so I suggest you avoid using it. The generation process
>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>
>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>> 100%.
>>>>>
>>>>> So is this expected or is there something wrong?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>
--------------010900090802060303080003
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
This error is an annoying one. It sounds like you've generated code
that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
to 1.4), but are compiling with Java 5.0 source compatibility. You'll
need to change them to match. I would generally expect this code in
ModelImporter.java to ensure that the new GenModel's Compliance Level
matches your preferences:<br>
<blockquote><small> protected void adjustGenModel(Monitor monitor)</small><br>
<small> {</small><br>
<small> String modelName =
URI.decode(getGenModelPath().removeFileExtension().lastSegme nt()); </small><br>
<small> int index = modelName.lastIndexOf('.');</small><br>
<small> if (index != -1)</small><br>
<small> {</small><br>
<small> modelName = modelName.substring(0, index);</small><br>
<small> }</small><br>
<small> modelName = CodeGenUtil.capName(modelName); </small><br>
<br>
<small> GenModel genModel = getGenModel();</small><br>
<small> genModel.setModelName(modelName);</small><br>
<small> genModel.setModelPluginID(getModelPluginID());</small><br>
<small> genModel.setModelDirectory(getModelPluginDirectory());</small ><br>
<small>
genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages()); </small><br>
<small> </small><br>
<small> if (getOriginalGenModel() == null)</small><br>
<small> {</small><br>
<small> URI genModelURI = genModel.eResource().getURI();</small><br>
<small> if (genModelURI.isPlatformResource())</small><br>
<small> {</small><br>
<small> IFile genModelFile =
ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(genModelURI.toPlatformString(true)));</small><br>
<small> IProject project = genModelFile.getProject();</small><br>
<small> String complianceLevel =
CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);</small ><br>
<small> if ("1.5".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);</small ><br>
<small> }</small><br>
<small> else if ("1.6".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);</small ><br>
<small> }</small><br>
<small> else if ("1.4".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);</small ><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
</blockquote>
<br>
<br>
david wrote:
<blockquote cite="mid:ff554v$e1k$1@build.eclipse.org" type="cite">Well
I tried generating them one at a time, model, edit etc. and that
worked. Now I have 142 of this type of error one per java file.
<br>
<br>
Cannot cast from EList<Object> to FeatureMap
MDDL_3b/src/org/mddl/mddl/_3/impl &nb sp; AddressImpl.java line 236
1192626673906 36704
<br>
<br>
I googled it and only found one reference to this error type and it was
in the context of OHF, with which I am unfamiliar.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<a class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092"><https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092></a>, so
perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------010900090802060303080003--
|
|
|
| Re: EMF model generation- performance problem? [message #99509 is a reply to message #99495] |
Wed, 17 October 2007 10:47   |
Eclipse User |
|
|
|
Ed,
You have lost me. My emf plugins are all 2.3 and I am using Europa and
Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
since I made no choice, simply followed the library tutorial. I went
through the project properties and could find nothing pertaining to
which EMF version is to be targeted. Am I missing something here?
I also found a reference to the ModelImporter.java class you refer to,
it is in the emf package. Is your suggestion to download the source for
EMF, change it to match your method below and compile? I looked for a
bug like this in the bug list but could not find it.
Thx.
David
Ed Merks wrote:
> David,
>
> This error is an annoying one. It sounds like you've generated code
> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
> to 1.4), but are compiling with Java 5.0 source compatibility. You'll
> need to change them to match. I would generally expect this code in
> ModelImporter.java to ensure that the new GenModel's Compliance Level
> matches your preferences:
>
> protected void adjustGenModel(Monitor monitor)
> {
> String modelName =
> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
> int index = modelName.lastIndexOf('.');
> if (index != -1)
> {
> modelName = modelName.substring(0, index);
> }
> modelName = CodeGenUtil.capName(modelName);
>
> GenModel genModel = getGenModel();
> genModel.setModelName(modelName);
> genModel.setModelPluginID(getModelPluginID());
> genModel.setModelDirectory(getModelPluginDirectory());
>
> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>
> if (getOriginalGenModel() == null)
> {
> URI genModelURI = genModel.eResource().getURI();
> if (genModelURI.isPlatformResource())
> {
> IFile genModelFile =
> ResourcesPlugin.getWorkspace().getRoot().getFile(new
> Path(genModelURI.toPlatformString(true)));
> IProject project = genModelFile.getProject();
> String complianceLevel =
> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
> if ("1.5".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
> }
> else if ("1.6".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
> }
> else if ("1.4".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
> }
> }
> }
> }
>
>
>
> david wrote:
>> Well I tried generating them one at a time, model, edit etc. and that
>> worked. Now I have 142 of this type of error one per java file.
>>
>> Cannot cast from EList<Object> to FeatureMap
>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>> 1192626673906 36704
>>
>> I googled it and only found one reference to this error type and it
>> was in the context of OHF, with which I am unfamiliar.
>>
>> Thx.
>>
>> David
>>
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>>> you make changes to the model 150092
>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>> deleting these two files and regenerating will fix the problem. I'm
>>> slightly confused though, if there is an org.mddl.mddl._3.impl
>>> package containing classes, are you saying there isn't really an
>>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>>> containing classes? I would expect the former to contain all the
>>> interfaces and the later to contain things like the XyzSwitch for the
>>> model...
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> I tried again to get to first base, following the library example
>>>> but using a much larger xsd. I get further but an error.
>>>>
>>>> Severity and Description Path Resource Location Creation
>>>> Time Id
>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>
>>>> This is after right clicking the genmodel and selecting 'Generate
>>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>>> '_3' not sure this has anything to do with this problem, but it may.
>>>> It does not show an error on the Export Package of
>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>>> example. I know that this feature has some very bad combinatorial
>>>>> behavior so I suggest you avoid using it. The generation process
>>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>
>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>>> 100%.
>>>>>>
>>>>>> So is this expected or is there something wrong?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>
|
|
|
| Re: EMF model generation- performance problem? [message #99524 is a reply to message #99509] |
Wed, 17 October 2007 10:54   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
David,
If you open the .genmodel and look at the properties for the GenModel
(root object in the Generator), what is the "Compliance Level" property
set to? I would expect 5.0 but suspect it's 1.4 instead...
david wrote:
> Ed,
>
> You have lost me. My emf plugins are all 2.3 and I am using Europa and
> Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
> since I made no choice, simply followed the library tutorial. I went
> through the project properties and could find nothing pertaining to
> which EMF version is to be targeted. Am I missing something here?
>
> I also found a reference to the ModelImporter.java class you refer to,
> it is in the emf package. Is your suggestion to download the source
> for EMF, change it to match your method below and compile? I looked
> for a bug like this in the bug list but could not find it.
>
> Thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> This error is an annoying one. It sounds like you've generated code
>> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property
>> set to 1.4), but are compiling with Java 5.0 source compatibility.
>> You'll need to change them to match. I would generally expect this
>> code in ModelImporter.java to ensure that the new GenModel's
>> Compliance Level matches your preferences:
>>
>> protected void adjustGenModel(Monitor monitor)
>> {
>> String modelName =
>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>> int index = modelName.lastIndexOf('.');
>> if (index != -1)
>> {
>> modelName = modelName.substring(0, index);
>> }
>> modelName = CodeGenUtil.capName(modelName);
>>
>> GenModel genModel = getGenModel();
>> genModel.setModelName(modelName);
>> genModel.setModelPluginID(getModelPluginID());
>> genModel.setModelDirectory(getModelPluginDirectory());
>>
>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>
>> if (getOriginalGenModel() == null)
>> {
>> URI genModelURI = genModel.eResource().getURI();
>> if (genModelURI.isPlatformResource())
>> {
>> IFile genModelFile =
>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>> Path(genModelURI.toPlatformString(true)));
>> IProject project = genModelFile.getProject();
>> String complianceLevel =
>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>> if ("1.5".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>> }
>> else if ("1.6".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>> }
>> else if ("1.4".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>> }
>> }
>> }
>> }
>>
>>
>>
>> david wrote:
>>> Well I tried generating them one at a time, model, edit etc. and
>>> that worked. Now I have 142 of this type of error one per java file.
>>>
>>> Cannot cast from EList<Object> to FeatureMap
>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>> 1192626673906 36704
>>>
>>> I googled it and only found one reference to this error type and it
>>> was in the context of OHF, with which I am unfamiliar.
>>>
>>> Thx.
>>>
>>> David
>>>
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge
>>>> if you make changes to the model 150092
>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>>> deleting these two files and regenerating will fix the problem.
>>>> I'm slightly confused though, if there is an
>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>> expect the former to contain all the interfaces and the later to
>>>> contain things like the XyzSwitch for the model...
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> I tried again to get to first base, following the library example
>>>>> but using a much larger xsd. I get further but an error.
>>>>>
>>>>> Severity and Description Path Resource Location
>>>>> Creation Time Id
>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>
>>>>> This is after right clicking the genmodel and selecting 'Generate
>>>>> All'. Unfortunately the xsd has a rather unfortunately named
>>>>> element '_3' not sure this has anything to do with this problem,
>>>>> but it may. It does not show an error on the Export Package of
>>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>> Ed Merks wrote:
>>>>>> David,
>>>>>>
>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>> schema example. I know that this feature has some very bad
>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>> times faster without it.
>>>>>>
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>
>>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I
>>>>>>> am using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>>> memory (-Xmx) and it is using all of it, it has been using 100%
>>>>>>> of 1 core now for 16 hours. This is after checking the "Create
>>>>>>> XML Schema to ECore map" checkbox and clicking Finish button. I
>>>>>>> am also running it on a separate desktop with dual Opterons, 4GB
>>>>>>> RAM and RAID5, it cannot even redraw the Eclipse UI, with one
>>>>>>> cpu at 100%.
>>>>>>>
>>>>>>> So is this expected or is there something wrong?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> David
>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #99605 is a reply to message #99450] |
Thu, 18 October 2007 03:47   |
Eclipse User |
|
|
|
Ed,
I tried this again on my laptop, which is jre 6. I had progressed
further using my workstation which is jre 5. It too did not generate the
org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package, even when
I generated model first (which is the one where these ecore artifacts
should be generated). I have not been able to determine what it is that
is causing this.
David
Ed Merks wrote:
> David,
>
> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
> you make changes to the model 150092
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
> deleting these two files and regenerating will fix the problem. I'm
> slightly confused though, if there is an org.mddl.mddl._3.impl package
> containing classes, are you saying there isn't really an
> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
> containing classes? I would expect the former to contain all the
> interfaces and the later to contain things like the XyzSwitch for the
> model...
>
>
> david wrote:
>> Hi,
>>
>> I tried again to get to first base, following the library example but
>> using a much larger xsd. I get further but an error.
>>
>> Severity and Description Path Resource Location Creation
>> Time Id
>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>
>> This is after right clicking the genmodel and selecting 'Generate
>> All'. Unfortunately the xsd has a rather unfortunately named element
>> '_3' not sure this has anything to do with this problem, but it may.
>> It does not show an error on the Export Package of
>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>
>> Thx.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>> example. I know that this feature has some very bad combinatorial
>>> behavior so I suggest you avoid using it. The generation process
>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Using Europa with both JDK 5 and also separately 6.
>>>>
>>>> I am using the tutorial in the help for "Generating an EMF model
>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>>> now for 16 hours. This is after checking the "Create XML Schema to
>>>> ECore map" checkbox and clicking Finish button. I am also running it
>>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>>
>>>> So is this expected or is there something wrong?
>>>>
>>>> Thanks,
>>>>
>>>> David
>
|
|
|
| Re: EMF model generation- performance problem? [message #99615 is a reply to message #99524] |
Thu, 18 October 2007 04:39   |
Eclipse User |
|
|
|
Ed,
Almost there now. I changed the compliance to 5.0 and generated each in
turn. It only has 6 errors now in the generated code for the Impl.
Severity and Description Path Resource Location Creation Time Id
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 41
1192637021609 64936
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 35
1192637040562 64938
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 33
1192637044609 64940
The return type is incompatible with Callable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 395
1192637021609 64937
The return type is incompatible with Putable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 347
1192637040562 64939
The return type is incompatible with Sinkable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 325
1192637044609 64941
Here is an abridged version of the smallest of these as generated.
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.mddl.mddl._3.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
import org.mddl.mddl._3.ExerciseRights;
import org.mddl.mddl._3.FirstAmount;
import org.mddl.mddl._3.FirstDate;
import org.mddl.mddl._3.LastAmount;
import org.mddl.mddl._3.LastDate;
import org.mddl.mddl._3.Limited;
import org.mddl.mddl._3.NextAmount;
import org.mddl.mddl._3.NextDate;
import org.mddl.mddl._3.NextPeriod;
import org.mddl.mddl._3.Notification;
import org.mddl.mddl._3.OtherType;
import org.mddl.mddl._3.PenultimateAmount;
import org.mddl.mddl._3.PenultimateDate;
import org.mddl.mddl._3.Period;
import org.mddl.mddl._3.PutConditionType;
import org.mddl.mddl._3.Putable;
import org.mddl.mddl._3.PutableGroup;
import org.mddl.mddl._3.PutableType;
import org.mddl.mddl._3.QualityEnumeration;
import org.mddl.mddl._3.Schedule;
import org.mddl.mddl._3.Sequence;
import org.mddl.mddl._3.Source;
import org.mddl.mddl._3.WhenType;
import org.mddl.mddl._3.v_3Package;
import org.mddl.mddl._3._3Package;
......
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Notification> getNotification() {
return
getPutableChildren().list(v_3Package.eINSTANCE.getPutable_No tification());
}
......
And the Interface generated
/**
* Returns the value of the '<em><b>Notification</b></em>' containment
reference list.
* The list contents are of type {@link org.mddl.mddl._3.Notification}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Notification</em>' containment reference
list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Notification</em>' containment
reference list.
* @see org.mddl.mddl._3.v_3Package#getPutable_Notification()
* @model containment="true" transient="true" volatile="true"
derived="true"
* extendedMetaData="kind='element' name='notification'
namespace='##targetNamespace' group='#PutableChildren:3'"
* @generated
*/
EList<Notification> getNotification();
I can manually fix these but that does not seem the point, given they
are generated.
A quick question, I do not like the XSD element named '_3' and would
like to override the elements name for my model without changing the
standards based xsd that it is generated from, is there a way of doing
this? I suspect I need to have my own version of the XSD, but thought it
worth enquiring.
thx.
David
Ed Merks wrote:
> David,
>
> If you open the .genmodel and look at the properties for the GenModel
> (root object in the Generator), what is the "Compliance Level" property
> set to? I would expect 5.0 but suspect it's 1.4 instead...
>
>
> david wrote:
>> Ed,
>>
>> You have lost me. My emf plugins are all 2.3 and I am using Europa and
>> Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
>> since I made no choice, simply followed the library tutorial. I went
>> through the project properties and could find nothing pertaining to
>> which EMF version is to be targeted. Am I missing something here?
>>
>> I also found a reference to the ModelImporter.java class you refer to,
>> it is in the emf package. Is your suggestion to download the source
>> for EMF, change it to match your method below and compile? I looked
>> for a bug like this in the bug list but could not find it.
>>
>> Thx.
>>
>> David
>>
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> This error is an annoying one. It sounds like you've generated code
>>> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property
>>> set to 1.4), but are compiling with Java 5.0 source compatibility.
>>> You'll need to change them to match. I would generally expect this
>>> code in ModelImporter.java to ensure that the new GenModel's
>>> Compliance Level matches your preferences:
>>>
>>> protected void adjustGenModel(Monitor monitor)
>>> {
>>> String modelName =
>>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>>> int index = modelName.lastIndexOf('.');
>>> if (index != -1)
>>> {
>>> modelName = modelName.substring(0, index);
>>> }
>>> modelName = CodeGenUtil.capName(modelName);
>>>
>>> GenModel genModel = getGenModel();
>>> genModel.setModelName(modelName);
>>> genModel.setModelPluginID(getModelPluginID());
>>> genModel.setModelDirectory(getModelPluginDirectory());
>>>
>>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>>
>>> if (getOriginalGenModel() == null)
>>> {
>>> URI genModelURI = genModel.eResource().getURI();
>>> if (genModelURI.isPlatformResource())
>>> {
>>> IFile genModelFile =
>>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>>> Path(genModelURI.toPlatformString(true)));
>>> IProject project = genModelFile.getProject();
>>> String complianceLevel =
>>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>>> if ("1.5".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>>> }
>>> else if ("1.6".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>>> }
>>> else if ("1.4".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>>> }
>>> }
>>> }
>>> }
>>>
>>>
>>>
>>> david wrote:
>>>> Well I tried generating them one at a time, model, edit etc. and
>>>> that worked. Now I have 142 of this type of error one per java file.
>>>>
>>>> Cannot cast from EList<Object> to FeatureMap
>>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>>> 1192626673906 36704
>>>>
>>>> I googled it and only found one reference to this error type and it
>>>> was in the context of OHF, with which I am unfamiliar.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge
>>>>> if you make changes to the model 150092
>>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>>>> deleting these two files and regenerating will fix the problem.
>>>>> I'm slightly confused though, if there is an
>>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>>> expect the former to contain all the interfaces and the later to
>>>>> contain things like the XyzSwitch for the model...
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I tried again to get to first base, following the library example
>>>>>> but using a much larger xsd. I get further but an error.
>>>>>>
>>>>>> Severity and Description Path Resource Location
>>>>>> Creation Time Id
>>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>>
>>>>>> This is after right clicking the genmodel and selecting 'Generate
>>>>>> All'. Unfortunately the xsd has a rather unfortunately named
>>>>>> element '_3' not sure this has anything to do with this problem,
>>>>>> but it may. It does not show an error on the Export Package of
>>>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>>>
>>>>>> Thx.
>>>>>>
>>>>>> David
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>>> schema example. I know that this feature has some very bad
>>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>>> times faster without it.
>>>>>>>
>>>>>>>
>>>>>>> david wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>>
>>>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I
>>>>>>>> am using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>>>> memory (-Xmx) and it is using all of it, it has been using 100%
>>>>>>>> of 1 core now for 16 hours. This is after checking the "Create
>>>>>>>> XML Schema to ECore map" checkbox and clicking Finish button. I
>>>>>>>> am also running it on a separate desktop with dual Opterons, 4GB
>>>>>>>> RAM and RAID5, it cannot even redraw the Eclipse UI, with one
>>>>>>>> cpu at 100%.
>>>>>>>>
>>>>>>>> So is this expected or is there something wrong?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> David
>>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #99625 is a reply to message #99615] |
Thu, 18 October 2007 07:55   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
David,
The import manager should normally avoid generating colliding imports,
but it's not smart enough to know what imports are in the target file
that might collide with the imports it will generate. So likely
deleting these files (or just deleting both colliding imports) and
regenerating them will avoid the problem. (I.e., I think you have this
problem purely because you moved form Java 1.4 to Java 5.0 which has
more explicit use of types in things like List<Notification> than does
Java 1.4.)
david wrote:
> Ed,
>
> Almost there now. I changed the compliance to 5.0 and generated each
> in turn. It only has 6 errors now in the generated code for the Impl.
>
> Severity and Description Path Resource Location Creation
> Time Id
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java
> line 41 1192637021609 64936
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java
> line 35 1192637040562 64938
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java
> line 33 1192637044609 64940
> The return type is incompatible with Callable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 395
> 1192637021609 64937
> The return type is incompatible with Putable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 347
> 1192637040562 64939
> The return type is incompatible with Sinkable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 325
> 1192637044609 64941
>
> Here is an abridged version of the smallest of these as generated.
>
> /**
> * <copyright>
> * </copyright>
> *
> * $Id$
> */
> package org.mddl.mddl._3.impl;
>
> import java.util.Collection;
>
> import org.eclipse.emf.common.notify.Notification;
> import org.eclipse.emf.common.notify.NotificationChain;
>
> import org.eclipse.emf.common.util.EList;
>
> import org.eclipse.emf.ecore.EClass;
> import org.eclipse.emf.ecore.InternalEObject;
>
> import org.eclipse.emf.ecore.impl.ENotificationImpl;
> import org.eclipse.emf.ecore.impl.EObjectImpl;
>
> import org.eclipse.emf.ecore.util.BasicFeatureMap;
> import org.eclipse.emf.ecore.util.FeatureMap;
> import org.eclipse.emf.ecore.util.InternalEList;
>
> import org.mddl.mddl._3.ExerciseRights;
> import org.mddl.mddl._3.FirstAmount;
> import org.mddl.mddl._3.FirstDate;
> import org.mddl.mddl._3.LastAmount;
> import org.mddl.mddl._3.LastDate;
> import org.mddl.mddl._3.Limited;
> import org.mddl.mddl._3.NextAmount;
> import org.mddl.mddl._3.NextDate;
> import org.mddl.mddl._3.NextPeriod;
> import org.mddl.mddl._3.Notification;
> import org.mddl.mddl._3.OtherType;
> import org.mddl.mddl._3.PenultimateAmount;
> import org.mddl.mddl._3.PenultimateDate;
> import org.mddl.mddl._3.Period;
> import org.mddl.mddl._3.PutConditionType;
> import org.mddl.mddl._3.Putable;
> import org.mddl.mddl._3.PutableGroup;
> import org.mddl.mddl._3.PutableType;
> import org.mddl.mddl._3.QualityEnumeration;
> import org.mddl.mddl._3.Schedule;
> import org.mddl.mddl._3.Sequence;
> import org.mddl.mddl._3.Source;
> import org.mddl.mddl._3.WhenType;
> import org.mddl.mddl._3.v_3Package;
> import org.mddl.mddl._3._3Package;
>
> .....
>
>
> /**
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> public EList<Notification> getNotification() {
> return
> getPutableChildren().list(v_3Package.eINSTANCE.getPutable_No tification());
>
> }
>
> .....
>
> And the Interface generated
>
>
> /**
> * Returns the value of the '<em><b>Notification</b></em>'
> containment reference list.
> * The list contents are of type {@link
> org.mddl.mddl._3.Notification}.
> * <!-- begin-user-doc -->
> * <p>
> * If the meaning of the '<em>Notification</em>' containment
> reference list isn't clear,
> * there really should be more of a description here...
> * </p>
> * <!-- end-user-doc -->
> * @return the value of the '<em>Notification</em>' containment
> reference list.
> * @see org.mddl.mddl._3.v_3Package#getPutable_Notification()
> * @model containment="true" transient="true" volatile="true"
> derived="true"
> * extendedMetaData="kind='element' name='notification'
> namespace='##targetNamespace' group='#PutableChildren:3'"
> * @generated
> */
> EList<Notification> getNotification();
>
> I can manually fix these but that does not seem the point, given they
> are generated.
>
> A quick question, I do not like the XSD element named '_3' and would
> like to override the elements name for my model without changing the
> standards based xsd that it is generated from, is there a way of doing
> this? I suspect I need to have my own version of the XSD, but thought
> it worth enquiring.
>
> thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> If you open the .genmodel and look at the properties for the GenModel
>> (root object in the Generator), what is the "Compliance Level"
>> property set to? I would expect 5.0 but suspect it's 1.4 instead...
>>
>>
>> david wrote:
>>> Ed,
>>>
>>> You have lost me. My emf plugins are all 2.3 and I am using Europa
>>> and Java 5. So I am not sure how I could be targeting EMF 2.2 and
>>> Java 1.4 since I made no choice, simply followed the library
>>> tutorial. I went through the project properties and could find
>>> nothing pertaining to which EMF version is to be targeted. Am I
>>> missing something here?
>>>
>>> I also found a reference to the ModelImporter.java class you refer
>>> to, it is in the emf package. Is your suggestion to download the
>>> source for EMF, change it to match your method below and compile? I
>>> looked for a bug like this in the bug list but could not find it.
>>>
>>> Thx.
>>>
>>> David
>>>
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> This error is an annoying one. It sounds like you've generated
>>>> code that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level
>>>> property set to 1.4), but are compiling with Java 5.0 source
>>>> compatibility. You'll need to change them to match. I would
>>>> generally expect this code in ModelImporter.java to ensure that the
>>>> new GenModel's Compliance Level matches your preferences:
>>>>
>>>> protected void adjustGenModel(Monitor monitor)
>>>> {
>>>> String modelName =
>>>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>>>> int index = modelName.lastIndexOf('.');
>>>> if (index != -1)
>>>> {
>>>> modelName = modelName.substring(0, index);
>>>> }
>>>> modelName = CodeGenUtil.capName(modelName);
>>>>
>>>> GenModel genModel = getGenModel();
>>>> genModel.setModelName(modelName);
>>>> genModel.setModelPluginID(getModelPluginID());
>>>> genModel.setModelDirectory(getModelPluginDirectory());
>>>>
>>>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>>>
>>>> if (getOriginalGenModel() == null)
>>>> {
>>>> URI genModelURI = genModel.eResource().getURI();
>>>> if (genModelURI.isPlatformResource())
>>>> {
>>>> IFile genModelFile =
>>>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>>>> Path(genModelURI.toPlatformString(true)));
>>>> IProject project = genModelFile.getProject();
>>>> String complianceLevel =
>>>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>>>> if ("1.5".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>>>> }
>>>> else if ("1.6".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>>>> }
>>>> else if ("1.4".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>>>> }
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> david wrote:
>>>>> Well I tried generating them one at a time, model, edit etc. and
>>>>> that worked. Now I have 142 of this type of error one per java file.
>>>>>
>>>>> Cannot cast from EList<Object> to FeatureMap
>>>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>>>> 1192626673906 36704
>>>>>
>>>>> I googled it and only found one reference to this error type and
>>>>> it was in the context of OHF, with which I am unfamiliar.
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>> David,
>>>>>>
>>>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or
>>>>>> merge if you make changes to the model 150092
>>>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so
>>>>>> perhaps deleting these two files and regenerating will fix the
>>>>>> problem. I'm slightly confused though, if there is an
>>>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>>>> expect the former to contain all the interfaces and the later to
>>>>>> contain things like the XyzSwitch for the model...
>>>>>>
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I tried again to get to first base, following the library
>>>>>>> example but using a much larger xsd. I get further but an error.
>>>>>>>
>>>>>>> Severity and Description Path Resource Location
>>>>>>> Creation Time Id
>>>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>>>
>>>>>>> This is after right clicking the genmodel and selecting
>>>>>>> 'Generate All'. Unfortunately the xsd has a rather unfortunately
>>>>>>> named element '_3' not sure this has anything to do with this
>>>>>>> problem, but it may. It does not show an error on the Export
>>>>>>> Package of org.mddl.mddl._3.impl though. There are 603 elements
>>>>>>> in this model.
>>>>>>>
>>>>>>> Thx.
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>> David,
>>>>>>>>
>>>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>>>> schema example. I know that this feature has some very bad
>>>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>>>> times faster without it.
>>>>>>>>
>>>>>>>>
>>>>>>>> david wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>>>
>>>>>>>>> I am using the tutorial in the help for "Generating an EMF
>>>>>>>>> model using XML Schema (XSD)". But instead of using the
>>>>>>>>> library.xsd I am using a large XSD, 1.5MB in size. This is on
>>>>>>>>> a dual core 2GHz laptop with 2GB of RAM. I have allowed
>>>>>>>>> Eclipse 750MB of working memory (-Xmx) and it is using all of
>>>>>>>>> it, it has been using 100% of 1 core now for 16 hours. This is
>>>>>>>>> after checking the "Create XML Schema to ECore map" checkbox
>>>>>>>>> and clicking Finish button. I am also running it on a separate
>>>>>>>>> desktop with dual Opterons, 4GB RAM and RAID5, it cannot even
>>>>>>>>> redraw the Eclipse UI, with one cpu at 100%.
>>>>>>>>>
>>>>>>>>> So is this expected or is there something wrong?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> David
>>>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #99635 is a reply to message #99605] |
Thu, 18 October 2007 07:58   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080304010801010204020200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
That's very wierd. Your namespaces are kind of horrible though, so
maybe you want to use an ecore:package annotation to specify a decent one.
XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
If the problem persists you could send me your schema and I'll try to
reproduce the problem. You can send it to merks at ca dot ibm dot com
if you don't want to post it to the newsgroup for all to see...
david wrote:
> Ed,
>
> I tried this again on my laptop, which is jre 6. I had progressed
> further using my workstation which is jre 5. It too did not generate
> the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package,
> even when I generated model first (which is the one where these ecore
> artifacts should be generated). I have not been able to determine what
> it is that is causing this.
>
> David
>
> Ed Merks wrote:
>> David,
>>
>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>> you make changes to the model 150092
>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>> deleting these two files and regenerating will fix the problem. I'm
>> slightly confused though, if there is an org.mddl.mddl._3.impl
>> package containing classes, are you saying there isn't really an
>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>> containing classes? I would expect the former to contain all the
>> interfaces and the later to contain things like the XyzSwitch for the
>> model...
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> I tried again to get to first base, following the library example
>>> but using a much larger xsd. I get further but an error.
>>>
>>> Severity and Description Path Resource Location Creation
>>> Time Id
>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>
>>> This is after right clicking the genmodel and selecting 'Generate
>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>> '_3' not sure this has anything to do with this problem, but it may.
>>> It does not show an error on the Export Package of
>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>
>>> Thx.
>>>
>>> David
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>> example. I know that this feature has some very bad combinatorial
>>>> behavior so I suggest you avoid using it. The generation process
>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>
>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>> 100%.
>>>>>
>>>>> So is this expected or is there something wrong?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>
--------------080304010801010204020200
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
That's very wierd. Your namespaces are kind of horrible though, so
maybe you want to use an ecore:package annotation to specify a decent
one.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
</blockquote>
If the problem persists you could send me your schema and I'll try to
reproduce the problem. You can send it to merks at ca dot ibm dot com
if you don't want to post it to the newsgroup for all to see...<br>
<br>
<br>
david wrote:
<blockquote cite="mid:ff730k$gkp$1@build.eclipse.org" type="cite">Ed,
<br>
<br>
I tried this again on my laptop, which is jre 6. I had progressed
further using my workstation which is jre 5. It too did not generate
the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package, even
when I generated model first (which is the one where these ecore
artifacts should be generated). I have not been able to determine what
it is that is causing this.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<a class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092"><https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092></a>, so
perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------080304010801010204020200--
|
|
|
| Re: EMF model generation- performance problem? [message #100550 is a reply to message #99635] |
Fri, 02 November 2007 12:10  |
Eclipse User |
|
|
|
Ed,
Switched to JRE 5 on the laptop, and it fixed the problem, so JRE 6 was
the problem, preventing the generation of the . I also had to Suppress
Interfaces,as the String exceeded the limit. But it worked!
David
Ed Merks wrote:
> David,
>
> That's very wierd. Your namespaces are kind of horrible though, so
> maybe you want to use an ecore:package annotation to specify a decent one.
>
> XML Schema to Ecore Mapping
> < http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>
> If the problem persists you could send me your schema and I'll try to
> reproduce the problem. You can send it to merks at ca dot ibm dot com
> if you don't want to post it to the newsgroup for all to see...
>
>
> david wrote:
>> Ed,
>>
>> I tried this again on my laptop, which is jre 6. I had progressed
>> further using my workstation which is jre 5. It too did not generate
>> the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package,
>> even when I generated model first (which is the one where these ecore
>> artifacts should be generated). I have not been able to determine what
>> it is that is causing this.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>>> you make changes to the model 150092
>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>> deleting these two files and regenerating will fix the problem. I'm
>>> slightly confused though, if there is an org.mddl.mddl._3.impl
>>> package containing classes, are you saying there isn't really an
>>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>>> containing classes? I would expect the former to contain all the
>>> interfaces and the later to contain things like the XyzSwitch for the
>>> model...
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> I tried again to get to first base, following the library example
>>>> but using a much larger xsd. I get further but an error.
>>>>
>>>> Severity and Description Path Resource Location Creation
>>>> Time Id
>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>
>>>> This is after right clicking the genmodel and selecting 'Generate
>>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>>> '_3' not sure this has anything to do with this problem, but it may.
>>>> It does not show an error on the Export Package of
>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>>> example. I know that this feature has some very bad combinatorial
>>>>> behavior so I suggest you avoid using it. The generation process
>>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>
>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>>> 100%.
>>>>>>
>>>>>> So is this expected or is there something wrong?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>
>
|
|
|
| Re: EMF model generation- performance problem? [message #610019 is a reply to message #99212] |
Tue, 16 October 2007 07:51  |
Eclipse User |
|
|
|
David,
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema example.
I know that this feature has some very bad combinatorial behavior so I
suggest you avoid using it. The generation process doesn't rely on it
and should proceed a 1000 times faster without it.
david wrote:
> Hi,
>
> Using Europa with both JDK 5 and also separately 6.
>
> I am using the tutorial in the help for "Generating an EMF model using
> XML Schema (XSD)". But instead of using the library.xsd I am using a
> large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
> of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it
> is using all of it, it has been using 100% of 1 core now for 16 hours.
> This is after checking the "Create XML Schema to ECore map" checkbox
> and clicking Finish button. I am also running it on a separate desktop
> with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
> Eclipse UI, with one cpu at 100%.
>
> So is this expected or is there something wrong?
>
> Thanks,
>
> David
|
|
|
| Re: EMF model generation- performance problem? [message #610047 is a reply to message #99230] |
Wed, 17 October 2007 09:04  |
Eclipse User |
|
|
|
Hi,
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
Severity and Description Path Resource Location Creation Time Id
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
Thx.
David
Ed Merks wrote:
> David,
>
> Sixteen hours is a little long. =-O It's a really bad idea to use
> "Create XML Schema to Ecore map" for anything but a toy schema example.
> I know that this feature has some very bad combinatorial behavior so I
> suggest you avoid using it. The generation process doesn't rely on it
> and should proceed a 1000 times faster without it.
>
>
> david wrote:
>> Hi,
>>
>> Using Europa with both JDK 5 and also separately 6.
>>
>> I am using the tutorial in the help for "Generating an EMF model using
>> XML Schema (XSD)". But instead of using the library.xsd I am using a
>> large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
>> of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it
>> is using all of it, it has been using 100% of 1 core now for 16 hours.
>> This is after checking the "Create XML Schema to ECore map" checkbox
>> and clicking Finish button. I am also running it on a separate desktop
>> with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
>> Eclipse UI, with one cpu at 100%.
>>
>> So is this expected or is there something wrong?
>>
>> Thanks,
>>
>> David
|
|
|
| Re: EMF model generation- performance problem? [message #610049 is a reply to message #99424] |
Wed, 17 October 2007 09:46  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------040303050908090602040406
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
deleting these two files and regenerating will fix the problem. I'm
slightly confused though, if there is an org.mddl.mddl._3.impl package
containing classes, are you saying there isn't really an
org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
containing classes? I would expect the former to contain all the
interfaces and the later to contain things like the XyzSwitch for the
model...
david wrote:
> Hi,
>
> I tried again to get to first base, following the library example but
> using a much larger xsd. I get further but an error.
>
> Severity and Description Path Resource Location Creation
> Time Id
> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
> Package 'org.mddl.mddl._3' does not exist in this plug-in
> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>
> This is after right clicking the genmodel and selecting 'Generate
> All'. Unfortunately the xsd has a rather unfortunately named element
> '_3' not sure this has anything to do with this problem, but it may.
> It does not show an error on the Export Package of
> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>
> Thx.
>
> David
>
> Ed Merks wrote:
>> David,
>>
>> Sixteen hours is a little long. =-O It's a really bad idea to use
>> "Create XML Schema to Ecore map" for anything but a toy schema
>> example. I know that this feature has some very bad combinatorial
>> behavior so I suggest you avoid using it. The generation process
>> doesn't rely on it and should proceed a 1000 times faster without it.
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> Using Europa with both JDK 5 and also separately 6.
>>>
>>> I am using the tutorial in the help for "Generating an EMF model
>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>> now for 16 hours. This is after checking the "Create XML Schema to
>>> ECore map" checkbox and clicking Finish button. I am also running it
>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>
>>> So is this expected or is there something wrong?
>>>
>>> Thanks,
>>>
>>> David
--------------040303050908090602040406
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model <a name="b150092"
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092">150092</a>,
so perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...<br>
<br>
<br>
david wrote:
<blockquote cite="mid:ff517h$d5g$1@build.eclipse.org" type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------040303050908090602040406--
|
|
|
| Re: EMF model generation- performance problem? [message #610052 is a reply to message #99450] |
Wed, 17 October 2007 10:11  |
Eclipse User |
|
|
|
Well I tried generating them one at a time, model, edit etc. and that
worked. Now I have 142 of this type of error one per java file.
Cannot cast from EList<Object> to FeatureMap
MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
1192626673906 36704
I googled it and only found one reference to this error type and it was
in the context of OHF, with which I am unfamiliar.
Thx.
David
Ed Merks wrote:
> David,
>
> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
> you make changes to the model 150092
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
> deleting these two files and regenerating will fix the problem. I'm
> slightly confused though, if there is an org.mddl.mddl._3.impl package
> containing classes, are you saying there isn't really an
> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
> containing classes? I would expect the former to contain all the
> interfaces and the later to contain things like the XyzSwitch for the
> model...
>
>
> david wrote:
>> Hi,
>>
>> I tried again to get to first base, following the library example but
>> using a much larger xsd. I get further but an error.
>>
>> Severity and Description Path Resource Location Creation
>> Time Id
>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>
>> This is after right clicking the genmodel and selecting 'Generate
>> All'. Unfortunately the xsd has a rather unfortunately named element
>> '_3' not sure this has anything to do with this problem, but it may.
>> It does not show an error on the Export Package of
>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>
>> Thx.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>> example. I know that this feature has some very bad combinatorial
>>> behavior so I suggest you avoid using it. The generation process
>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Using Europa with both JDK 5 and also separately 6.
>>>>
>>>> I am using the tutorial in the help for "Generating an EMF model
>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>>> now for 16 hours. This is after checking the "Create XML Schema to
>>>> ECore map" checkbox and clicking Finish button. I am also running it
>>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>>
>>>> So is this expected or is there something wrong?
>>>>
>>>> Thanks,
>>>>
>>>> David
>
|
|
|
| Re: EMF model generation- performance problem? [message #610055 is a reply to message #99479] |
Wed, 17 October 2007 10:25  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------010900090802060303080003
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
This error is an annoying one. It sounds like you've generated code
that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
to 1.4), but are compiling with Java 5.0 source compatibility. You'll
need to change them to match. I would generally expect this code in
ModelImporter.java to ensure that the new GenModel's Compliance Level
matches your preferences:
protected void adjustGenModel(Monitor monitor)
{
String modelName =
URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
int index = modelName.lastIndexOf('.');
if (index != -1)
{
modelName = modelName.substring(0, index);
}
modelName = CodeGenUtil.capName(modelName);
GenModel genModel = getGenModel();
genModel.setModelName(modelName);
genModel.setModelPluginID(getModelPluginID());
genModel.setModelDirectory(getModelPluginDirectory());
genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
if (getOriginalGenModel() == null)
{
URI genModelURI = genModel.eResource().getURI();
if (genModelURI.isPlatformResource())
{
IFile genModelFile =
ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(genModelURI.toPlatformString(true)));
IProject project = genModelFile.getProject();
String complianceLevel =
CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
if ("1.5".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
}
else if ("1.6".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
}
else if ("1.4".equals(complianceLevel))
{
genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
}
}
}
}
david wrote:
> Well I tried generating them one at a time, model, edit etc. and that
> worked. Now I have 142 of this type of error one per java file.
>
> Cannot cast from EList<Object> to FeatureMap
> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
> 1192626673906 36704
>
> I googled it and only found one reference to this error type and it
> was in the context of OHF, with which I am unfamiliar.
>
> Thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>> you make changes to the model 150092
>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>> deleting these two files and regenerating will fix the problem. I'm
>> slightly confused though, if there is an org.mddl.mddl._3.impl
>> package containing classes, are you saying there isn't really an
>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>> containing classes? I would expect the former to contain all the
>> interfaces and the later to contain things like the XyzSwitch for the
>> model...
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> I tried again to get to first base, following the library example
>>> but using a much larger xsd. I get further but an error.
>>>
>>> Severity and Description Path Resource Location Creation
>>> Time Id
>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>
>>> This is after right clicking the genmodel and selecting 'Generate
>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>> '_3' not sure this has anything to do with this problem, but it may.
>>> It does not show an error on the Export Package of
>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>
>>> Thx.
>>>
>>> David
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>> example. I know that this feature has some very bad combinatorial
>>>> behavior so I suggest you avoid using it. The generation process
>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>
>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>> 100%.
>>>>>
>>>>> So is this expected or is there something wrong?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>
--------------010900090802060303080003
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
This error is an annoying one. It sounds like you've generated code
that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
to 1.4), but are compiling with Java 5.0 source compatibility. You'll
need to change them to match. I would generally expect this code in
ModelImporter.java to ensure that the new GenModel's Compliance Level
matches your preferences:<br>
<blockquote><small> protected void adjustGenModel(Monitor monitor)</small><br>
<small> {</small><br>
<small> String modelName =
URI.decode(getGenModelPath().removeFileExtension().lastSegme nt()); </small><br>
<small> int index = modelName.lastIndexOf('.');</small><br>
<small> if (index != -1)</small><br>
<small> {</small><br>
<small> modelName = modelName.substring(0, index);</small><br>
<small> }</small><br>
<small> modelName = CodeGenUtil.capName(modelName); </small><br>
<br>
<small> GenModel genModel = getGenModel();</small><br>
<small> genModel.setModelName(modelName);</small><br>
<small> genModel.setModelPluginID(getModelPluginID());</small><br>
<small> genModel.setModelDirectory(getModelPluginDirectory());</small ><br>
<small>
genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages()); </small><br>
<small> </small><br>
<small> if (getOriginalGenModel() == null)</small><br>
<small> {</small><br>
<small> URI genModelURI = genModel.eResource().getURI();</small><br>
<small> if (genModelURI.isPlatformResource())</small><br>
<small> {</small><br>
<small> IFile genModelFile =
ResourcesPlugin.getWorkspace().getRoot().getFile(new
Path(genModelURI.toPlatformString(true)));</small><br>
<small> IProject project = genModelFile.getProject();</small><br>
<small> String complianceLevel =
CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);</small ><br>
<small> if ("1.5".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);</small ><br>
<small> }</small><br>
<small> else if ("1.6".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);</small ><br>
<small> }</small><br>
<small> else if ("1.4".equals(complianceLevel))</small><br>
<small> {</small><br>
<small>
genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);</small ><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
<small> }</small><br>
</blockquote>
<br>
<br>
david wrote:
<blockquote cite="mid:ff554v$e1k$1@build.eclipse.org" type="cite">Well
I tried generating them one at a time, model, edit etc. and that
worked. Now I have 142 of this type of error one per java file.
<br>
<br>
Cannot cast from EList<Object> to FeatureMap
MDDL_3b/src/org/mddl/mddl/_3/impl &nb sp; AddressImpl.java line 236
1192626673906 36704
<br>
<br>
I googled it and only found one reference to this error type and it was
in the context of OHF, with which I am unfamiliar.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<a class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092"><https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092></a>, so
perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------010900090802060303080003--
|
|
|
| Re: EMF model generation- performance problem? [message #610057 is a reply to message #99495] |
Wed, 17 October 2007 10:47  |
Eclipse User |
|
|
|
Ed,
You have lost me. My emf plugins are all 2.3 and I am using Europa and
Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
since I made no choice, simply followed the library tutorial. I went
through the project properties and could find nothing pertaining to
which EMF version is to be targeted. Am I missing something here?
I also found a reference to the ModelImporter.java class you refer to,
it is in the emf package. Is your suggestion to download the source for
EMF, change it to match your method below and compile? I looked for a
bug like this in the bug list but could not find it.
Thx.
David
Ed Merks wrote:
> David,
>
> This error is an annoying one. It sounds like you've generated code
> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property set
> to 1.4), but are compiling with Java 5.0 source compatibility. You'll
> need to change them to match. I would generally expect this code in
> ModelImporter.java to ensure that the new GenModel's Compliance Level
> matches your preferences:
>
> protected void adjustGenModel(Monitor monitor)
> {
> String modelName =
> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
> int index = modelName.lastIndexOf('.');
> if (index != -1)
> {
> modelName = modelName.substring(0, index);
> }
> modelName = CodeGenUtil.capName(modelName);
>
> GenModel genModel = getGenModel();
> genModel.setModelName(modelName);
> genModel.setModelPluginID(getModelPluginID());
> genModel.setModelDirectory(getModelPluginDirectory());
>
> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>
> if (getOriginalGenModel() == null)
> {
> URI genModelURI = genModel.eResource().getURI();
> if (genModelURI.isPlatformResource())
> {
> IFile genModelFile =
> ResourcesPlugin.getWorkspace().getRoot().getFile(new
> Path(genModelURI.toPlatformString(true)));
> IProject project = genModelFile.getProject();
> String complianceLevel =
> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
> if ("1.5".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
> }
> else if ("1.6".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
> }
> else if ("1.4".equals(complianceLevel))
> {
> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
> }
> }
> }
> }
>
>
>
> david wrote:
>> Well I tried generating them one at a time, model, edit etc. and that
>> worked. Now I have 142 of this type of error one per java file.
>>
>> Cannot cast from EList<Object> to FeatureMap
>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>> 1192626673906 36704
>>
>> I googled it and only found one reference to this error type and it
>> was in the context of OHF, with which I am unfamiliar.
>>
>> Thx.
>>
>> David
>>
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>>> you make changes to the model 150092
>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>> deleting these two files and regenerating will fix the problem. I'm
>>> slightly confused though, if there is an org.mddl.mddl._3.impl
>>> package containing classes, are you saying there isn't really an
>>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>>> containing classes? I would expect the former to contain all the
>>> interfaces and the later to contain things like the XyzSwitch for the
>>> model...
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> I tried again to get to first base, following the library example
>>>> but using a much larger xsd. I get further but an error.
>>>>
>>>> Severity and Description Path Resource Location Creation
>>>> Time Id
>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>
>>>> This is after right clicking the genmodel and selecting 'Generate
>>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>>> '_3' not sure this has anything to do with this problem, but it may.
>>>> It does not show an error on the Export Package of
>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>>> example. I know that this feature has some very bad combinatorial
>>>>> behavior so I suggest you avoid using it. The generation process
>>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>
>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>>> 100%.
>>>>>>
>>>>>> So is this expected or is there something wrong?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>
|
|
|
| Re: EMF model generation- performance problem? [message #610059 is a reply to message #99509] |
Wed, 17 October 2007 10:54  |
Eclipse User |
|
|
|
David,
If you open the .genmodel and look at the properties for the GenModel
(root object in the Generator), what is the "Compliance Level" property
set to? I would expect 5.0 but suspect it's 1.4 instead...
david wrote:
> Ed,
>
> You have lost me. My emf plugins are all 2.3 and I am using Europa and
> Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
> since I made no choice, simply followed the library tutorial. I went
> through the project properties and could find nothing pertaining to
> which EMF version is to be targeted. Am I missing something here?
>
> I also found a reference to the ModelImporter.java class you refer to,
> it is in the emf package. Is your suggestion to download the source
> for EMF, change it to match your method below and compile? I looked
> for a bug like this in the bug list but could not find it.
>
> Thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> This error is an annoying one. It sounds like you've generated code
>> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property
>> set to 1.4), but are compiling with Java 5.0 source compatibility.
>> You'll need to change them to match. I would generally expect this
>> code in ModelImporter.java to ensure that the new GenModel's
>> Compliance Level matches your preferences:
>>
>> protected void adjustGenModel(Monitor monitor)
>> {
>> String modelName =
>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>> int index = modelName.lastIndexOf('.');
>> if (index != -1)
>> {
>> modelName = modelName.substring(0, index);
>> }
>> modelName = CodeGenUtil.capName(modelName);
>>
>> GenModel genModel = getGenModel();
>> genModel.setModelName(modelName);
>> genModel.setModelPluginID(getModelPluginID());
>> genModel.setModelDirectory(getModelPluginDirectory());
>>
>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>
>> if (getOriginalGenModel() == null)
>> {
>> URI genModelURI = genModel.eResource().getURI();
>> if (genModelURI.isPlatformResource())
>> {
>> IFile genModelFile =
>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>> Path(genModelURI.toPlatformString(true)));
>> IProject project = genModelFile.getProject();
>> String complianceLevel =
>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>> if ("1.5".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>> }
>> else if ("1.6".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>> }
>> else if ("1.4".equals(complianceLevel))
>> {
>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>> }
>> }
>> }
>> }
>>
>>
>>
>> david wrote:
>>> Well I tried generating them one at a time, model, edit etc. and
>>> that worked. Now I have 142 of this type of error one per java file.
>>>
>>> Cannot cast from EList<Object> to FeatureMap
>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>> 1192626673906 36704
>>>
>>> I googled it and only found one reference to this error type and it
>>> was in the context of OHF, with which I am unfamiliar.
>>>
>>> Thx.
>>>
>>> David
>>>
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge
>>>> if you make changes to the model 150092
>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>>> deleting these two files and regenerating will fix the problem.
>>>> I'm slightly confused though, if there is an
>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>> expect the former to contain all the interfaces and the later to
>>>> contain things like the XyzSwitch for the model...
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> I tried again to get to first base, following the library example
>>>>> but using a much larger xsd. I get further but an error.
>>>>>
>>>>> Severity and Description Path Resource Location
>>>>> Creation Time Id
>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>
>>>>> This is after right clicking the genmodel and selecting 'Generate
>>>>> All'. Unfortunately the xsd has a rather unfortunately named
>>>>> element '_3' not sure this has anything to do with this problem,
>>>>> but it may. It does not show an error on the Export Package of
>>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>> Ed Merks wrote:
>>>>>> David,
>>>>>>
>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>> schema example. I know that this feature has some very bad
>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>> times faster without it.
>>>>>>
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>
>>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I
>>>>>>> am using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>>> memory (-Xmx) and it is using all of it, it has been using 100%
>>>>>>> of 1 core now for 16 hours. This is after checking the "Create
>>>>>>> XML Schema to ECore map" checkbox and clicking Finish button. I
>>>>>>> am also running it on a separate desktop with dual Opterons, 4GB
>>>>>>> RAM and RAID5, it cannot even redraw the Eclipse UI, with one
>>>>>>> cpu at 100%.
>>>>>>>
>>>>>>> So is this expected or is there something wrong?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> David
>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #610070 is a reply to message #99450] |
Thu, 18 October 2007 03:47  |
Eclipse User |
|
|
|
Ed,
I tried this again on my laptop, which is jre 6. I had progressed
further using my workstation which is jre 5. It too did not generate the
org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package, even when
I generated model first (which is the one where these ecore artifacts
should be generated). I have not been able to determine what it is that
is causing this.
David
Ed Merks wrote:
> David,
>
> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
> you make changes to the model 150092
> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
> deleting these two files and regenerating will fix the problem. I'm
> slightly confused though, if there is an org.mddl.mddl._3.impl package
> containing classes, are you saying there isn't really an
> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
> containing classes? I would expect the former to contain all the
> interfaces and the later to contain things like the XyzSwitch for the
> model...
>
>
> david wrote:
>> Hi,
>>
>> I tried again to get to first base, following the library example but
>> using a much larger xsd. I get further but an error.
>>
>> Severity and Description Path Resource Location Creation
>> Time Id
>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>
>> This is after right clicking the genmodel and selecting 'Generate
>> All'. Unfortunately the xsd has a rather unfortunately named element
>> '_3' not sure this has anything to do with this problem, but it may.
>> It does not show an error on the Export Package of
>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>
>> Thx.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>> example. I know that this feature has some very bad combinatorial
>>> behavior so I suggest you avoid using it. The generation process
>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> Using Europa with both JDK 5 and also separately 6.
>>>>
>>>> I am using the tutorial in the help for "Generating an EMF model
>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz laptop
>>>> with 2GB of RAM. I have allowed Eclipse 750MB of working memory
>>>> (-Xmx) and it is using all of it, it has been using 100% of 1 core
>>>> now for 16 hours. This is after checking the "Create XML Schema to
>>>> ECore map" checkbox and clicking Finish button. I am also running it
>>>> on a separate desktop with dual Opterons, 4GB RAM and RAID5, it
>>>> cannot even redraw the Eclipse UI, with one cpu at 100%.
>>>>
>>>> So is this expected or is there something wrong?
>>>>
>>>> Thanks,
>>>>
>>>> David
>
|
|
|
| Re: EMF model generation- performance problem? [message #610072 is a reply to message #99524] |
Thu, 18 October 2007 04:39  |
Eclipse User |
|
|
|
Ed,
Almost there now. I changed the compliance to 5.0 and generated each in
turn. It only has 6 errors now in the generated code for the Impl.
Severity and Description Path Resource Location Creation Time Id
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 41
1192637021609 64936
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 35
1192637040562 64938
The import org.mddl.mddl._3.Notification collides with another import
statement MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 33
1192637044609 64940
The return type is incompatible with Callable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 395
1192637021609 64937
The return type is incompatible with Putable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 347
1192637040562 64939
The return type is incompatible with Sinkable.getNotification()
MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 325
1192637044609 64941
Here is an abridged version of the smallest of these as generated.
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.mddl.mddl._3.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
import org.mddl.mddl._3.ExerciseRights;
import org.mddl.mddl._3.FirstAmount;
import org.mddl.mddl._3.FirstDate;
import org.mddl.mddl._3.LastAmount;
import org.mddl.mddl._3.LastDate;
import org.mddl.mddl._3.Limited;
import org.mddl.mddl._3.NextAmount;
import org.mddl.mddl._3.NextDate;
import org.mddl.mddl._3.NextPeriod;
import org.mddl.mddl._3.Notification;
import org.mddl.mddl._3.OtherType;
import org.mddl.mddl._3.PenultimateAmount;
import org.mddl.mddl._3.PenultimateDate;
import org.mddl.mddl._3.Period;
import org.mddl.mddl._3.PutConditionType;
import org.mddl.mddl._3.Putable;
import org.mddl.mddl._3.PutableGroup;
import org.mddl.mddl._3.PutableType;
import org.mddl.mddl._3.QualityEnumeration;
import org.mddl.mddl._3.Schedule;
import org.mddl.mddl._3.Sequence;
import org.mddl.mddl._3.Source;
import org.mddl.mddl._3.WhenType;
import org.mddl.mddl._3.v_3Package;
import org.mddl.mddl._3._3Package;
......
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<Notification> getNotification() {
return
getPutableChildren().list(v_3Package.eINSTANCE.getPutable_No tification());
}
......
And the Interface generated
/**
* Returns the value of the '<em><b>Notification</b></em>' containment
reference list.
* The list contents are of type {@link org.mddl.mddl._3.Notification}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Notification</em>' containment reference
list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Notification</em>' containment
reference list.
* @see org.mddl.mddl._3.v_3Package#getPutable_Notification()
* @model containment="true" transient="true" volatile="true"
derived="true"
* extendedMetaData="kind='element' name='notification'
namespace='##targetNamespace' group='#PutableChildren:3'"
* @generated
*/
EList<Notification> getNotification();
I can manually fix these but that does not seem the point, given they
are generated.
A quick question, I do not like the XSD element named '_3' and would
like to override the elements name for my model without changing the
standards based xsd that it is generated from, is there a way of doing
this? I suspect I need to have my own version of the XSD, but thought it
worth enquiring.
thx.
David
Ed Merks wrote:
> David,
>
> If you open the .genmodel and look at the properties for the GenModel
> (root object in the Generator), what is the "Compliance Level" property
> set to? I would expect 5.0 but suspect it's 1.4 instead...
>
>
> david wrote:
>> Ed,
>>
>> You have lost me. My emf plugins are all 2.3 and I am using Europa and
>> Java 5. So I am not sure how I could be targeting EMF 2.2 and Java 1.4
>> since I made no choice, simply followed the library tutorial. I went
>> through the project properties and could find nothing pertaining to
>> which EMF version is to be targeted. Am I missing something here?
>>
>> I also found a reference to the ModelImporter.java class you refer to,
>> it is in the emf package. Is your suggestion to download the source
>> for EMF, change it to match your method below and compile? I looked
>> for a bug like this in the bug list but could not find it.
>>
>> Thx.
>>
>> David
>>
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> This error is an annoying one. It sounds like you've generated code
>>> that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level property
>>> set to 1.4), but are compiling with Java 5.0 source compatibility.
>>> You'll need to change them to match. I would generally expect this
>>> code in ModelImporter.java to ensure that the new GenModel's
>>> Compliance Level matches your preferences:
>>>
>>> protected void adjustGenModel(Monitor monitor)
>>> {
>>> String modelName =
>>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>>> int index = modelName.lastIndexOf('.');
>>> if (index != -1)
>>> {
>>> modelName = modelName.substring(0, index);
>>> }
>>> modelName = CodeGenUtil.capName(modelName);
>>>
>>> GenModel genModel = getGenModel();
>>> genModel.setModelName(modelName);
>>> genModel.setModelPluginID(getModelPluginID());
>>> genModel.setModelDirectory(getModelPluginDirectory());
>>>
>>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>>
>>> if (getOriginalGenModel() == null)
>>> {
>>> URI genModelURI = genModel.eResource().getURI();
>>> if (genModelURI.isPlatformResource())
>>> {
>>> IFile genModelFile =
>>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>>> Path(genModelURI.toPlatformString(true)));
>>> IProject project = genModelFile.getProject();
>>> String complianceLevel =
>>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>>> if ("1.5".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>>> }
>>> else if ("1.6".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>>> }
>>> else if ("1.4".equals(complianceLevel))
>>> {
>>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>>> }
>>> }
>>> }
>>> }
>>>
>>>
>>>
>>> david wrote:
>>>> Well I tried generating them one at a time, model, edit etc. and
>>>> that worked. Now I have 142 of this type of error one per java file.
>>>>
>>>> Cannot cast from EList<Object> to FeatureMap
>>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>>> 1192626673906 36704
>>>>
>>>> I googled it and only found one reference to this error type and it
>>>> was in the context of OHF, with which I am unfamiliar.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge
>>>>> if you make changes to the model 150092
>>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>>>> deleting these two files and regenerating will fix the problem.
>>>>> I'm slightly confused though, if there is an
>>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>>> expect the former to contain all the interfaces and the later to
>>>>> contain things like the XyzSwitch for the model...
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I tried again to get to first base, following the library example
>>>>>> but using a much larger xsd. I get further but an error.
>>>>>>
>>>>>> Severity and Description Path Resource Location
>>>>>> Creation Time Id
>>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>>
>>>>>> This is after right clicking the genmodel and selecting 'Generate
>>>>>> All'. Unfortunately the xsd has a rather unfortunately named
>>>>>> element '_3' not sure this has anything to do with this problem,
>>>>>> but it may. It does not show an error on the Export Package of
>>>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>>>
>>>>>> Thx.
>>>>>>
>>>>>> David
>>>>>>
>>>>>> Ed Merks wrote:
>>>>>>> David,
>>>>>>>
>>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>>> schema example. I know that this feature has some very bad
>>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>>> times faster without it.
>>>>>>>
>>>>>>>
>>>>>>> david wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>>
>>>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I
>>>>>>>> am using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>>>> memory (-Xmx) and it is using all of it, it has been using 100%
>>>>>>>> of 1 core now for 16 hours. This is after checking the "Create
>>>>>>>> XML Schema to ECore map" checkbox and clicking Finish button. I
>>>>>>>> am also running it on a separate desktop with dual Opterons, 4GB
>>>>>>>> RAM and RAID5, it cannot even redraw the Eclipse UI, with one
>>>>>>>> cpu at 100%.
>>>>>>>>
>>>>>>>> So is this expected or is there something wrong?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> David
>>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #610074 is a reply to message #99615] |
Thu, 18 October 2007 07:55  |
Eclipse User |
|
|
|
David,
The import manager should normally avoid generating colliding imports,
but it's not smart enough to know what imports are in the target file
that might collide with the imports it will generate. So likely
deleting these files (or just deleting both colliding imports) and
regenerating them will avoid the problem. (I.e., I think you have this
problem purely because you moved form Java 1.4 to Java 5.0 which has
more explicit use of types in things like List<Notification> than does
Java 1.4.)
david wrote:
> Ed,
>
> Almost there now. I changed the compliance to 5.0 and generated each
> in turn. It only has 6 errors now in the generated code for the Impl.
>
> Severity and Description Path Resource Location Creation
> Time Id
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java
> line 41 1192637021609 64936
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java
> line 35 1192637040562 64938
> The import org.mddl.mddl._3.Notification collides with another import
> statement MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java
> line 33 1192637044609 64940
> The return type is incompatible with Callable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl CallableImpl.java line 395
> 1192637021609 64937
> The return type is incompatible with Putable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl PutableImpl.java line 347
> 1192637040562 64939
> The return type is incompatible with Sinkable.getNotification()
> MDDL_3b/src/org/mddl/mddl/_3/impl SinkableImpl.java line 325
> 1192637044609 64941
>
> Here is an abridged version of the smallest of these as generated.
>
> /**
> * <copyright>
> * </copyright>
> *
> * $Id$
> */
> package org.mddl.mddl._3.impl;
>
> import java.util.Collection;
>
> import org.eclipse.emf.common.notify.Notification;
> import org.eclipse.emf.common.notify.NotificationChain;
>
> import org.eclipse.emf.common.util.EList;
>
> import org.eclipse.emf.ecore.EClass;
> import org.eclipse.emf.ecore.InternalEObject;
>
> import org.eclipse.emf.ecore.impl.ENotificationImpl;
> import org.eclipse.emf.ecore.impl.EObjectImpl;
>
> import org.eclipse.emf.ecore.util.BasicFeatureMap;
> import org.eclipse.emf.ecore.util.FeatureMap;
> import org.eclipse.emf.ecore.util.InternalEList;
>
> import org.mddl.mddl._3.ExerciseRights;
> import org.mddl.mddl._3.FirstAmount;
> import org.mddl.mddl._3.FirstDate;
> import org.mddl.mddl._3.LastAmount;
> import org.mddl.mddl._3.LastDate;
> import org.mddl.mddl._3.Limited;
> import org.mddl.mddl._3.NextAmount;
> import org.mddl.mddl._3.NextDate;
> import org.mddl.mddl._3.NextPeriod;
> import org.mddl.mddl._3.Notification;
> import org.mddl.mddl._3.OtherType;
> import org.mddl.mddl._3.PenultimateAmount;
> import org.mddl.mddl._3.PenultimateDate;
> import org.mddl.mddl._3.Period;
> import org.mddl.mddl._3.PutConditionType;
> import org.mddl.mddl._3.Putable;
> import org.mddl.mddl._3.PutableGroup;
> import org.mddl.mddl._3.PutableType;
> import org.mddl.mddl._3.QualityEnumeration;
> import org.mddl.mddl._3.Schedule;
> import org.mddl.mddl._3.Sequence;
> import org.mddl.mddl._3.Source;
> import org.mddl.mddl._3.WhenType;
> import org.mddl.mddl._3.v_3Package;
> import org.mddl.mddl._3._3Package;
>
> .....
>
>
> /**
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> public EList<Notification> getNotification() {
> return
> getPutableChildren().list(v_3Package.eINSTANCE.getPutable_No tification());
>
> }
>
> .....
>
> And the Interface generated
>
>
> /**
> * Returns the value of the '<em><b>Notification</b></em>'
> containment reference list.
> * The list contents are of type {@link
> org.mddl.mddl._3.Notification}.
> * <!-- begin-user-doc -->
> * <p>
> * If the meaning of the '<em>Notification</em>' containment
> reference list isn't clear,
> * there really should be more of a description here...
> * </p>
> * <!-- end-user-doc -->
> * @return the value of the '<em>Notification</em>' containment
> reference list.
> * @see org.mddl.mddl._3.v_3Package#getPutable_Notification()
> * @model containment="true" transient="true" volatile="true"
> derived="true"
> * extendedMetaData="kind='element' name='notification'
> namespace='##targetNamespace' group='#PutableChildren:3'"
> * @generated
> */
> EList<Notification> getNotification();
>
> I can manually fix these but that does not seem the point, given they
> are generated.
>
> A quick question, I do not like the XSD element named '_3' and would
> like to override the elements name for my model without changing the
> standards based xsd that it is generated from, is there a way of doing
> this? I suspect I need to have my own version of the XSD, but thought
> it worth enquiring.
>
> thx.
>
> David
>
>
> Ed Merks wrote:
>> David,
>>
>> If you open the .genmodel and look at the properties for the GenModel
>> (root object in the Generator), what is the "Compliance Level"
>> property set to? I would expect 5.0 but suspect it's 1.4 instead...
>>
>>
>> david wrote:
>>> Ed,
>>>
>>> You have lost me. My emf plugins are all 2.3 and I am using Europa
>>> and Java 5. So I am not sure how I could be targeting EMF 2.2 and
>>> Java 1.4 since I made no choice, simply followed the library
>>> tutorial. I went through the project properties and could find
>>> nothing pertaining to which EMF version is to be targeted. Am I
>>> missing something here?
>>>
>>> I also found a reference to the ModelImporter.java class you refer
>>> to, it is in the emf package. Is your suggestion to download the
>>> source for EMF, change it to match your method below and compile? I
>>> looked for a bug like this in the bug list but could not find it.
>>>
>>> Thx.
>>>
>>> David
>>>
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> This error is an annoying one. It sounds like you've generated
>>>> code that targets EMF 2.2/Java 1.4 (GenModel's Compliance Level
>>>> property set to 1.4), but are compiling with Java 5.0 source
>>>> compatibility. You'll need to change them to match. I would
>>>> generally expect this code in ModelImporter.java to ensure that the
>>>> new GenModel's Compliance Level matches your preferences:
>>>>
>>>> protected void adjustGenModel(Monitor monitor)
>>>> {
>>>> String modelName =
>>>> URI.decode(getGenModelPath().removeFileExtension().lastSegme nt());
>>>> int index = modelName.lastIndexOf('.');
>>>> if (index != -1)
>>>> {
>>>> modelName = modelName.substring(0, index);
>>>> }
>>>> modelName = CodeGenUtil.capName(modelName);
>>>>
>>>> GenModel genModel = getGenModel();
>>>> genModel.setModelName(modelName);
>>>> genModel.setModelPluginID(getModelPluginID());
>>>> genModel.setModelDirectory(getModelPluginDirectory());
>>>>
>>>> genModel.getUsedGenPackages().addAll(genModel.computeMissing UsedGenPackages());
>>>>
>>>> if (getOriginalGenModel() == null)
>>>> {
>>>> URI genModelURI = genModel.eResource().getURI();
>>>> if (genModelURI.isPlatformResource())
>>>> {
>>>> IFile genModelFile =
>>>> ResourcesPlugin.getWorkspace().getRoot().getFile(new
>>>> Path(genModelURI.toPlatformString(true)));
>>>> IProject project = genModelFile.getProject();
>>>> String complianceLevel =
>>>> CodeGenUtil.EclipseUtil.getJavaComplianceLevel(project);
>>>> if ("1.5".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK50_LITERAL);
>>>> }
>>>> else if ("1.6".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK60_LITERAL);
>>>> }
>>>> else if ("1.4".equals(complianceLevel))
>>>> {
>>>> genModel.setComplianceLevel(GenJDKLevel.JDK14_LITERAL);
>>>> }
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>>
>>>> david wrote:
>>>>> Well I tried generating them one at a time, model, edit etc. and
>>>>> that worked. Now I have 142 of this type of error one per java file.
>>>>>
>>>>> Cannot cast from EList<Object> to FeatureMap
>>>>> MDDL_3b/src/org/mddl/mddl/_3/impl AddressImpl.java line 236
>>>>> 1192626673906 36704
>>>>>
>>>>> I googled it and only found one reference to this error type and
>>>>> it was in the context of OHF, with which I am unfamiliar.
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> Ed Merks wrote:
>>>>>> David,
>>>>>>
>>>>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or
>>>>>> merge if you make changes to the model 150092
>>>>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so
>>>>>> perhaps deleting these two files and regenerating will fix the
>>>>>> problem. I'm slightly confused though, if there is an
>>>>>> org.mddl.mddl._3.impl package containing classes, are you saying
>>>>>> there isn't really an org.mddl.mddl._3 package nor an
>>>>>> org.mddl.mddl._3.util package also containing classes? I would
>>>>>> expect the former to contain all the interfaces and the later to
>>>>>> contain things like the XyzSwitch for the model...
>>>>>>
>>>>>>
>>>>>> david wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I tried again to get to first base, following the library
>>>>>>> example but using a much larger xsd. I get further but an error.
>>>>>>>
>>>>>>> Severity and Description Path Resource Location
>>>>>>> Creation Time Id
>>>>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>>>>
>>>>>>> This is after right clicking the genmodel and selecting
>>>>>>> 'Generate All'. Unfortunately the xsd has a rather unfortunately
>>>>>>> named element '_3' not sure this has anything to do with this
>>>>>>> problem, but it may. It does not show an error on the Export
>>>>>>> Package of org.mddl.mddl._3.impl though. There are 603 elements
>>>>>>> in this model.
>>>>>>>
>>>>>>> Thx.
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> Ed Merks wrote:
>>>>>>>> David,
>>>>>>>>
>>>>>>>> Sixteen hours is a little long. =-O It's a really bad idea to
>>>>>>>> use "Create XML Schema to Ecore map" for anything but a toy
>>>>>>>> schema example. I know that this feature has some very bad
>>>>>>>> combinatorial behavior so I suggest you avoid using it. The
>>>>>>>> generation process doesn't rely on it and should proceed a 1000
>>>>>>>> times faster without it.
>>>>>>>>
>>>>>>>>
>>>>>>>> david wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>>>>
>>>>>>>>> I am using the tutorial in the help for "Generating an EMF
>>>>>>>>> model using XML Schema (XSD)". But instead of using the
>>>>>>>>> library.xsd I am using a large XSD, 1.5MB in size. This is on
>>>>>>>>> a dual core 2GHz laptop with 2GB of RAM. I have allowed
>>>>>>>>> Eclipse 750MB of working memory (-Xmx) and it is using all of
>>>>>>>>> it, it has been using 100% of 1 core now for 16 hours. This is
>>>>>>>>> after checking the "Create XML Schema to ECore map" checkbox
>>>>>>>>> and clicking Finish button. I am also running it on a separate
>>>>>>>>> desktop with dual Opterons, 4GB RAM and RAID5, it cannot even
>>>>>>>>> redraw the Eclipse UI, with one cpu at 100%.
>>>>>>>>>
>>>>>>>>> So is this expected or is there something wrong?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>>
>>>>>>>>> David
>>>>>>
|
|
|
| Re: EMF model generation- performance problem? [message #610076 is a reply to message #99605] |
Thu, 18 October 2007 07:58  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------080304010801010204020200
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
David,
That's very wierd. Your namespaces are kind of horrible though, so
maybe you want to use an ecore:package annotation to specify a decent one.
XML Schema to Ecore Mapping
< http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
If the problem persists you could send me your schema and I'll try to
reproduce the problem. You can send it to merks at ca dot ibm dot com
if you don't want to post it to the newsgroup for all to see...
david wrote:
> Ed,
>
> I tried this again on my laptop, which is jre 6. I had progressed
> further using my workstation which is jre 5. It too did not generate
> the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package,
> even when I generated model first (which is the one where these ecore
> artifacts should be generated). I have not been able to determine what
> it is that is causing this.
>
> David
>
> Ed Merks wrote:
>> David,
>>
>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>> you make changes to the model 150092
>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>> deleting these two files and regenerating will fix the problem. I'm
>> slightly confused though, if there is an org.mddl.mddl._3.impl
>> package containing classes, are you saying there isn't really an
>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>> containing classes? I would expect the former to contain all the
>> interfaces and the later to contain things like the XyzSwitch for the
>> model...
>>
>>
>> david wrote:
>>> Hi,
>>>
>>> I tried again to get to first base, following the library example
>>> but using a much larger xsd. I get further but an error.
>>>
>>> Severity and Description Path Resource Location Creation
>>> Time Id
>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>
>>> This is after right clicking the genmodel and selecting 'Generate
>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>> '_3' not sure this has anything to do with this problem, but it may.
>>> It does not show an error on the Export Package of
>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>
>>> Thx.
>>>
>>> David
>>>
>>> Ed Merks wrote:
>>>> David,
>>>>
>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>> example. I know that this feature has some very bad combinatorial
>>>> behavior so I suggest you avoid using it. The generation process
>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>
>>>>
>>>> david wrote:
>>>>> Hi,
>>>>>
>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>
>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>> 100%.
>>>>>
>>>>> So is this expected or is there something wrong?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> David
>>
--------------080304010801010204020200
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
That's very wierd. Your namespaces are kind of horrible though, so
maybe you want to use an ecore:package annotation to specify a decent
one.<br>
<blockquote><a
href=" http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
</blockquote>
If the problem persists you could send me your schema and I'll try to
reproduce the problem. You can send it to merks at ca dot ibm dot com
if you don't want to post it to the newsgroup for all to see...<br>
<br>
<br>
david wrote:
<blockquote cite="mid:ff730k$gkp$1@build.eclipse.org" type="cite">Ed,
<br>
<br>
I tried this again on my laptop, which is jre 6. I had progressed
further using my workstation which is jre 5. It too did not generate
the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package, even
when I generated model first (which is the one where these ecore
artifacts should be generated). I have not been able to determine what
it is that is causing this.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
you make changes to the model 150092
<a class="moz-txt-link-rfc2396E" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092"><https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092></a>, so
perhaps deleting these two files and regenerating will fix the
problem. I'm slightly confused though, if there is an
org.mddl.mddl._3.impl package containing classes, are you saying there
isn't really an org.mddl.mddl._3 package nor an org.mddl.mddl._3.util
package also containing classes? I would expect the former to contain
all the interfaces and the later to contain things like the XyzSwitch
for the model...
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
I tried again to get to first base, following the library example but
using a much larger xsd. I get further but an error.
<br>
<br>
Severity and Description Path Resource Location Creation
Time Id
<br>
Package 'org.mddl.mddl._3.util' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
<br>
Package 'org.mddl.mddl._3' does not exist in this plug-in
MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
<br>
<br>
This is after right clicking the genmodel and selecting 'Generate All'.
Unfortunately the xsd has a rather unfortunately named element '_3' not
sure this has anything to do with this problem, but it may. It does not
show an error on the Export Package of org.mddl.mddl._3.impl though.
There are 603 elements in this model.
<br>
<br>
Thx.
<br>
<br>
David
<br>
<br>
Ed Merks wrote:
<br>
<blockquote type="cite">David,
<br>
<br>
Sixteen hours is a little long. =-O It's a really bad idea to use
"Create XML Schema to Ecore map" for anything but a toy schema
example. I know that this feature has some very bad combinatorial
behavior so I suggest you avoid using it. The generation process
doesn't rely on it and should proceed a 1000 times faster without it.
<br>
<br>
<br>
david wrote:
<br>
<blockquote type="cite">Hi,
<br>
<br>
Using Europa with both JDK 5 and also separately 6.
<br>
<br>
I am using the tutorial in the help for "Generating an EMF model using
XML Schema (XSD)". But instead of using the library.xsd I am using a
large XSD, 1.5MB in size. This is on a dual core 2GHz laptop with 2GB
of RAM. I have allowed Eclipse 750MB of working memory (-Xmx) and it is
using all of it, it has been using 100% of 1 core now for 16 hours.
This is after checking the "Create XML Schema to ECore map" checkbox
and clicking Finish button. I am also running it on a separate desktop
with dual Opterons, 4GB RAM and RAID5, it cannot even redraw the
Eclipse UI, with one cpu at 100%.
<br>
<br>
So is this expected or is there something wrong?
<br>
<br>
Thanks,
<br>
<br>
David
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------080304010801010204020200--
|
|
|
| Re: EMF model generation- performance problem? [message #610198 is a reply to message #99635] |
Fri, 02 November 2007 12:10  |
Eclipse User |
|
|
|
Ed,
Switched to JRE 5 on the laptop, and it fixed the problem, so JRE 6 was
the problem, preventing the generation of the . I also had to Suppress
Interfaces,as the String exceeded the limit. But it worked!
David
Ed Merks wrote:
> David,
>
> That's very wierd. Your namespaces are kind of horrible though, so
> maybe you want to use an ecore:package annotation to specify a decent one.
>
> XML Schema to Ecore Mapping
> < http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchema ToEcoreMapping.pdf>
>
> If the problem persists you could send me your schema and I'll try to
> reproduce the problem. You can send it to merks at ca dot ibm dot com
> if you don't want to post it to the newsgroup for all to see...
>
>
> david wrote:
>> Ed,
>>
>> I tried this again on my laptop, which is jre 6. I had progressed
>> further using my workstation which is jre 5. It too did not generate
>> the org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package,
>> even when I generated model first (which is the one where these ecore
>> artifacts should be generated). I have not been able to determine what
>> it is that is causing this.
>>
>> David
>>
>> Ed Merks wrote:
>>> David,
>>>
>>> Note that the plugin.xml and MANIFEST.MF do no regenerate or merge if
>>> you make changes to the model 150092
>>> <https://bugs.eclipse.org/bugs/show_bug.cgi?id=150092>, so perhaps
>>> deleting these two files and regenerating will fix the problem. I'm
>>> slightly confused though, if there is an org.mddl.mddl._3.impl
>>> package containing classes, are you saying there isn't really an
>>> org.mddl.mddl._3 package nor an org.mddl.mddl._3.util package also
>>> containing classes? I would expect the former to contain all the
>>> interfaces and the later to contain things like the XyzSwitch for the
>>> model...
>>>
>>>
>>> david wrote:
>>>> Hi,
>>>>
>>>> I tried again to get to first base, following the library example
>>>> but using a much larger xsd. I get further but an error.
>>>>
>>>> Severity and Description Path Resource Location Creation
>>>> Time Id
>>>> Package 'org.mddl.mddl._3.util' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 11 1192620812875 4
>>>> Package 'org.mddl.mddl._3' does not exist in this plug-in
>>>> MDDL_3b/META-INF MANIFEST.MF line 9 1192620812875 3
>>>>
>>>> This is after right clicking the genmodel and selecting 'Generate
>>>> All'. Unfortunately the xsd has a rather unfortunately named element
>>>> '_3' not sure this has anything to do with this problem, but it may.
>>>> It does not show an error on the Export Package of
>>>> org.mddl.mddl._3.impl though. There are 603 elements in this model.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> Ed Merks wrote:
>>>>> David,
>>>>>
>>>>> Sixteen hours is a little long. =-O It's a really bad idea to use
>>>>> "Create XML Schema to Ecore map" for anything but a toy schema
>>>>> example. I know that this feature has some very bad combinatorial
>>>>> behavior so I suggest you avoid using it. The generation process
>>>>> doesn't rely on it and should proceed a 1000 times faster without it.
>>>>>
>>>>>
>>>>> david wrote:
>>>>>> Hi,
>>>>>>
>>>>>> Using Europa with both JDK 5 and also separately 6.
>>>>>>
>>>>>> I am using the tutorial in the help for "Generating an EMF model
>>>>>> using XML Schema (XSD)". But instead of using the library.xsd I am
>>>>>> using a large XSD, 1.5MB in size. This is on a dual core 2GHz
>>>>>> laptop with 2GB of RAM. I have allowed Eclipse 750MB of working
>>>>>> memory (-Xmx) and it is using all of it, it has been using 100% of
>>>>>> 1 core now for 16 hours. This is after checking the "Create XML
>>>>>> Schema to ECore map" checkbox and clicking Finish button. I am
>>>>>> also running it on a separate desktop with dual Opterons, 4GB RAM
>>>>>> and RAID5, it cannot even redraw the Eclipse UI, with one cpu at
>>>>>> 100%.
>>>>>>
>>>>>> So is this expected or is there something wrong?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> David
>>>
>
|
|
|
Goto Forum:
Current Time: Fri Nov 07 16:03:53 EST 2025
Powered by FUDForum. Page generated in 0.09349 seconds
|