Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Galileo performance twice as slow?
Galileo performance twice as slow? [message #480443] Mon, 17 August 2009 07:56 Go to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Hi,

Wen have just trasitioned our mod4j project from Ganymede (using oAW) to
galileo. We find that the performance of the code generator using Xpand
is about twice as slow as under Ganymede. I measured this manually but
am quite surprised by this. Is this a know issue?

Jos Warmer
Re: Galileo performance twice as slow? [message #480446 is a reply to message #480443] Mon, 17 August 2009 08:15 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jos,

that's kind of a suprise. Actually we thought that we incorporated some
very good improvements that should speed up the execution of an Xpand
based code generator by at least 30%.

Can you provide a reproduceable example that demonstrates the observed
slowdown?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 17.08.09 09:56, schrieb Jos Warmer:
> Hi,
>
> Wen have just trasitioned our mod4j project from Ganymede (using oAW) to
> galileo. We find that the performance of the code generator using Xpand
> is about twice as slow as under Ganymede. I measured this manually but
> am quite surprised by this. Is this a know issue?
> Jos Warmer
>
Re: Galileo performance twice as slow? [message #480459 is a reply to message #480446] Mon, 17 August 2009 09:00 Go to previous messageGo to next message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
Jos,

You're using several interconnected textual DSLs for you models, right? And
you've migrated that to TMF Xtext, haven't you?

Maybe there are some issues with sub-optimal cross-reference calculations
while traversing the models. That's a major difference between oAW Xtext and
TMF Xtext and may cause significant overhead if results are not cached
properly.

Cheers,
Achim

Sebastian Zarnekow wrote:

> Hi Jos,
>
> that's kind of a suprise. Actually we thought that we incorporated some
> very good improvements that should speed up the execution of an Xpand
> based code generator by at least 30%.
>
> Can you provide a reproduceable example that demonstrates the observed
> slowdown?
>
> Regards,
> Sebastian
Re: Galileo performance twice as slow? [message #480467 is a reply to message #480459] Mon, 17 August 2009 09:30 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Achim,

We use our own cross-reference tolling (CrossX), which has not changed. So
I would be surprised if that makes a difference.

I have measured the difference with a manual stopwatch, and was asking the
question to see whether this was a knows issue. Now that I see it is not
I will try to setup some explicit measurement to see which components are
the problem.

Jos
Re: Galileo performance twice as slow? [message #480473 is a reply to message #480446] Mon, 17 August 2009 09:57 Go to previous messageGo to next message
ekkehard gentz is currently offline ekkehard gentzFriend
Messages: 118
Registered: July 2009
Location: rosenheim, Germany, bavar...
Senior Member

This is a multi-part message in MIME format.
--------------080903050000020501040100
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Sebastian Zarnekow schrieb:
> Hi Jos,
>
> that's kind of a suprise. Actually we thought that we incorporated
> some very good improvements that should speed up the execution of an
> Xpand based code generator by at least 30%.
>
> Can you provide a reproduceable example that demonstrates the observed
> slowdown?
>
> Regards,
> Sebastian
hopefully this message will not be twice - I posted a hour before from
Community Forums

--
from my experiences performance was

* 30 - 50% better if only EMF is onvolved
* nearly the ame as before if UML2 + UML2 Profiles involved

but I noticed a slowdown of Xpand/Xtend builder (other topic)

--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@ekkes-corner.org
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


--------------080903050000020501040100
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sebastian Zarnekow schrieb:
<blockquote cite="mid:h6b3il$npe$1@build.eclipse.org" type="cite">Hi
Jos,
<br>
<br>
that's kind of a suprise. Actually we thought that we incorporated some
very good improvements that should speed up the execution of an Xpand
based code generator by at least 30%.
<br>
<br>
Can you provide a reproduceable example that demonstrates the observed
slowdown?
<br>
<br>
Regards,
<br>
Sebastian
<br>
</blockquote>
hopefully this message will not be twice - I posted a hour before from
Community Forums<br>
<br>
--<br>
from my experiences performance was<br>
<br>
* 30 - 50% better if only EMF is onvolved<br>
* nearly the ame as before if UML2 + UML2 Profiles involved<br>
<br>
but I noticed a slowdown of Xpand/Xtend builder (other topic)<br>
<br>
<div class="moz-signature">-- <br>
<p style="margin-bottom: 0cm;"> <font ,="" color="#808080"
face="Verdana, sans-serif"> <font size="4">ekke (ekkehard gentz)<br>
</font> <font size="3"> independent software-architect<br>
senior erp-consultant<br>
</font> <font size="2">eclipse | osgi | equinox | mdsd | oaw | emf |
uml<br>
max-josefs-platz 30, D-83022 rosenheim, germany<br>
<a class="moz-txt-link-freetext" href="mailto:ekke@ekkes-corner.org">mailto:ekke@ekkes-corner.org</a><br>
homepage (de): <a class="moz-txt-link-freetext" href="http://gentz-software.de">http://gentz-software.de</a><br>
blog (en): <a class="moz-txt-link-freetext" href="http://ekkes-corner.org">http://ekkes-corner.org</a><br>
twitter: @ekkescorner<br>
skype: ekkes-corner<br>
</font> <font size="1"> Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID:
DE189929490<br>
</font> </font> </p>
</div>
</body>
</html>

--------------080903050000020501040100--


ekke
independent software architect

blog: http://ekkes-corner.org
twitter: @ekkescorner
Re: Galileo performance twice as slow? [message #480501 is a reply to message #480443] Mon, 17 August 2009 12:30 Go to previous messageGo to next message
Krzysztof Kowalczyk is currently offline Krzysztof KowalczykFriend
Messages: 113
Registered: July 2009
Senior Member
Jos Warmer pisze:
> Hi,
>
> Wen have just trasitioned our mod4j project from Ganymede (using oAW) to
> galileo. We find that the performance of the code generator using Xpand
> is about twice as slow as under Ganymede. I measured this manually but
> am quite surprised by this. Is this a know issue?
> Jos Warmer
>

AFAIK, there is big slowdown for invoking Xtend "JAVA" extensions in
some situations.

There were also some performance problems mentioned in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278753

Regards,
Krzysztof Kowalczyk
Re: Galileo performance twice as slow? [message #480513 is a reply to message #480501] Mon, 17 August 2009 13:02 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Krzysztof,

Thanks for the pointer. We use Java extension quite a bit and run the
workflow from within an Eclipse plugin. I think that the bug you refer to
is the problem behind our performance problems.

I see that the latest patch for this bug is committed to the HEAD branch,
so I can test whether this solves our problems using the latest MWE build.

Jos
Re: Galileo performance twice as slow? [message #480681 is a reply to message #480513] Tue, 18 August 2009 08:31 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Hi,

I have installed the 0.7.2 release of Xtext, Xtend, Xpand and MWE.
According to the release notes the bug concerning class loading should be
fixed in the release. To my surprise I see no difference in the
performance. It might be the case that there is another issue behind our
problems.

Jos
Re: Galileo performance twice as slow? [message #480689 is a reply to message #480681] Tue, 18 August 2009 08:35 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jos,

as suggested in the patch you'll have to enable the performance boost
manually as it breaks backwards compatibility:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278753#c18

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 18.08.09 10:31, schrieb Jos Warmer:
> Hi,
>
> I have installed the 0.7.2 release of Xtext, Xtend, Xpand and MWE.
> According to the release notes the bug concerning class loading should
> be fixed in the release. To my surprise I see no difference in the
> performance. It might be the case that there is another issue behind our
> problems.
>
> Jos
>
Re: Galileo performance twice as slow? [message #480771 is a reply to message #480689] Tue, 18 August 2009 12:44 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Sebastian,

I assume you refer to this piece of code:

CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
OsgiResourceLoader(
Activator.PLUGIN_ID, // a plugin that has declared the required
deps
MWEPlugin.INSTANCE.getBaseURL(),
RunWorkflows.class.getClassLoader())); // a class from this plugin
ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);

I am not sure where I should put this code. I tried to put it into an
Activator class . First of all, there is no three-argument constructor
for OsgiResourceLoader, so I removed the second argument.

However, it does not seem to work. At least I see no difference in
performance. Can you explain where to put this code?

Jos
Re: Galileo performance twice as slow? [message #480821 is a reply to message #480771] Tue, 18 August 2009 14:56 Go to previous messageGo to next message
ekkehard gentz is currently offline ekkehard gentzFriend
Messages: 118
Registered: July 2009
Location: rosenheim, Germany, bavar...
Senior Member

This is a multi-part message in MIME format.
--------------080103030300030409090205
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

in my projects EMF M2M and Generation works fast (faster then 4.3.1)
but esp. UML - M2M is very slow (same as 4.3.1, but 20 minutes for
generation is much),
I hoped that M2T-Xpand was faster

perhaps I also run into the performance problem with Java Classes ?

workflow from domain-specific project calls cartridges in another
plug-in (workspace) project

I have to do some more performance tests later,
but if it helps to change a workflow component to use the
OSGIResourceLoader I could try it out,
but where and how to implement ?

ekke

Jos Warmer schrieb:
> Sebastian,
>
> I assume you refer to this piece of code:
>
> CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
> OsgiResourceLoader(
> Activator.PLUGIN_ID, // a plugin that has declared the required
> deps
> MWEPlugin.INSTANCE.getBaseURL(),
> RunWorkflows.class.getClassLoader())); // a class from this plugin
> ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);
>
> I am not sure where I should put this code. I tried to put it into an
> Activator class . First of all, there is no three-argument
> constructor for OsgiResourceLoader, so I removed the second argument.
>
> However, it does not seem to work. At least I see no difference in
> performance. Can you explain where to put this code?
>
> Jos
>


--

ekke (ekkehard gentz)
independent software-architect
senior erp-consultant
eclipse | osgi | equinox | mdsd | oaw | emf | uml
max-josefs-platz 30, D-83022 rosenheim, germany
mailto:ekke@ekkes-corner.org
homepage (de): http://gentz-software.de
blog (en): http://ekkes-corner.org
twitter: @ekkescorner
skype: ekkes-corner
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


--------------080103030300030409090205
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
in my


ekke
independent software architect

blog: http://ekkes-corner.org
twitter: @ekkescorner
Re: Galileo performance twice as slow? [message #480900 is a reply to message #480771] Tue, 18 August 2009 19:21 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Jos,

how do you start your generator?

You are right, the third param was removed after the last code review.
Somewhere in the context of your application, you'll need to configure
the ResourceLoaderFactory to use the caching resource loader instead of
the default implemenation. Doing this in the activator of your plugin
should work - at least in theory. Do you launch the generator in a job?
This would spawn an own thread and thereby ignore the current thread
resource loader. This raises the initial question: How do you start your
generator?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 18.08.09 14:44, schrieb Jos Warmer:
> Sebastian,
>
> I assume you refer to this piece of code:
>
> CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
> OsgiResourceLoader(
> Activator.PLUGIN_ID, // a plugin that has declared the required deps
> MWEPlugin.INSTANCE.getBaseURL(), RunWorkflows.class.getClassLoader()));
> // a class from this plugin
> ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);
>
> I am not sure where I should put this code. I tried to put it into an
> Activator class . First of all, there is no three-argument constructor
> for OsgiResourceLoader, so I removed the second argument.
>
> However, it does not seem to work. At least I see no difference in
> performance. Can you explain where to put this code?
>
> Jos
>
Re: Galileo performance twice as slow? [message #481502 is a reply to message #480900] Fri, 21 August 2009 10:14 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Sebastian,

We have quite a lot of plugins running. There are two that are involved in starting the workflow.

The workflow is initiated through a Builder, which is part of the plugin org.mod4j,.eclipse.
The Builder calls a method fro a second plugin org.mod4j.common.
From this method the MWE workflowrunner is started as follows:
        WorkflowRunner runner = new WorkflowRunner();

       if (!runner.run(wfFile, new NullProgressMonitor(), properties, slotContents)) {
            logger.error("------- ERROR(S) detected while running workflow : [" + wfFile + "] ");
            throw new Mod4jWorkflowException("ERROR(S) detected while running workflow :" + wfFile);
        }

The call to runner.run(...) is the one taking up all the time.
I have tried to put the code to configure the caching recource loader in the Activator of both the org.mod4j.eclipse and the org.mod4j.common plugin. There is no observable difference in performance.

The exact code that I added in the Activator in e.g org.mod4j.common is:
    CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
            OsgiResourceLoader(
                    Activator.PLUGIN_ID,                      // The Activator in which this code resides
                    FileTrack.class.getClassLoader()          // FileTrack is a class inside org.modj.common
            )
    ); // a class from this plugin

    ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);

Any ideas?

Jos,

[Updated on: Fri, 21 August 2009 10:30]

Report message to a moderator

Re: Galileo performance twice as slow? [message #481509 is a reply to message #481502] Fri, 21 August 2009 10:43 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jos,

please try to put the code directly before the "runner.run". Furthermore
please ensure that the referenced templates and extensions are directly
on the classpath of the plugin that contains the FileTrack-class or at
least registered via an explicit buddy policy. Otherwise the classloader
is very slow when it comes to resolution of types etc.

Hope that helps,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 21.08.09 12:14, schrieb Jos Warmer:
> Sebastian,
>
> We have quite a lot of plugins running. There are two that are involved
> in starting the workflow.
>
> The workflow is initiated through a Builder, which is part of the plugin
> org.mod4j,.eclipse.
> The Builder calls a method fro a second plugin org.mod4j.common.
> From this method the MWE workflowrunner is started as follows:
>
> WorkflowRunner runner = new WorkflowRunner();
>
> if (!runner.run(wfFile, new NullProgressMonitor(), properties,
> slotContents)) {
> logger.error("------- ERROR(S) detected while running workflow : [" +
> wfFile + "] ");
> throw new Mod4jWorkflowException("ERROR(S) detected while running
> workflow :" + wfFile);
> }
>
> The call to runner.run(...) is the one taking up all the time. I have
> tried to put the code to configure the caching recource loader in the
> Activator of both the org.mod4j.eclipse and the org.mod4j.common plugin.
> There is no observable difference in performance.
>
> The exact code that I added in the Activator in e.g org.mod4j.common is:
>
> CachingResourceLoaderImpl crl = new CachingResourceLoaderImpl(new
> OsgiResourceLoader(
> Activator.PLUGIN_ID, // The Activator in which this code resides
> FileTrack.class.getClassLoader() // FileTrack is a class inside
> org.modj.common
> )
> ); // a class from this plugin
>
> ResourceLoaderFactory.setCurrentThreadResourceLoader(crl);
>
> Any ideas?
>
> Jos,
Re: Galileo performance twice as slow? [message #481839 is a reply to message #481509] Mon, 24 August 2009 14:07 Go to previous messageGo to next message
Jos Warmer is currently offline Jos WarmerFriend
Messages: 66
Registered: July 2009
Member
Sebastian,

Good news! it works ok when I put the code just in front of the run method and add the necessary buddy policies. Learned some interesting things about OSGi class loading on the way.

The strange thing however is that setting the caching classloader in the Activator of the plugin doesn't work. Directl;y after setting it, it is ok, but when later on the run method is called the classloader (asked with ResourceLoaderFactory.getCurrentThreadResourceLoader() returns null. It seems to get lost somewhere while the plugin is active.

Jos
Re: Galileo performance twice as slow? [message #481846 is a reply to message #481839] Mon, 24 August 2009 14:30 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Jos,

that's good news.

The ResourceLoaderFactory stores the resource loader per thread (as the
method name getCurrentThreadResourceLoader() suggests). Your workflow
will be executed in a seperate thread and therefore does not use the
resource loader, that was registered in the bundle activator.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 24.08.09 16:07, schrieb Jos Warmer:
> Sebastian,
>
> Good news! it works ok when I put the code just in front of the run
> method and add the necessary buddy policies. Learned some interesting
> things about OSGi class loading on the way.
>
> The strange thing however is that setting the caching classloader in the
> Activator of the plugin doesn't work. Directl;y after setting it, it is
> ok, but when later on the run method is called the classloader (asked
> with ResourceLoaderFactory.getCurrentThreadResourceLoader() returns
> null. It seems to get lost somewhere while the plugin is active.
>
> Jos
Previous Topic:How to use XMI model files as input for Xpand?
Next Topic:[XPAND] clear Xtend cached objects
Goto Forum:
  


Current Time: Sat Apr 20 00:27:27 GMT 2024

Powered by FUDForum. Page generated in 0.05766 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top