Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Texo] How to improve speed of generating java classes?
[Texo] How to improve speed of generating java classes? [message #915545] Mon, 17 September 2012 09:58 Go to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Hi Martin,

First of all, Texo is just great and allow us introduce EMF support with minimal impact for other technology.
In order to hide the EMF for other developer, we use Eclispse XText to create our DSL to describe the business domain model and when the user click save, We generate an ecore on the fly and pass it to Texo to generate Java classes.

The biggest issue currently is the speed of generating Java classes via Texo is much slower than directly generating Java classes via our own template with Eclipse XTend2.

Is there any way to improve this situation?

Re: [Texo] How to improve speed of generating java classes? [message #915555 is a reply to message #915545] Mon, 17 September 2012 10:20 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
I notice that Texo using XPand to generate code.
It seems it has been replaced with another language called XTend2 from the same author of XText.
It seems XTend2 has big performance improvements over XPand since it's compiled to Java.
This is an article about performance between them written by their author sven efftinge.
http_://blog.efftinge.de/2011/03/rough-performance-comparison-between.html

The result is pretty impressive. He said Xtend2 is roughly 10 times as fast as in Xpand. Cool
Re: [Texo] How to improve speed of generating java classes? [message #915556 is a reply to message #915555] Mon, 17 September 2012 10:21 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Sorry, since I am not allowed to post link, please remove "_" after "http"
Re: [Texo] How to improve speed of generating java classes? [message #916350 is a reply to message #915556] Tue, 18 September 2012 18:39 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
Yes you are right that xtend2 is faster than xpand. The only thing is that it is quite some work to change this. Also
because Texo supports replacement of templates in the development project itself:
http://wiki.eclipse.org/Texo/Template_Overriding#Overriding_a_template

I am not sure if that's possible with xtend2. I have also considered moving to acceleo, as this seems also to be a
viable choice.

But I must be realistic, looking at the time I have and other responsibilities, I am quite sure that this change to
xtend2 or acceleo won't happen for the upcoming mid-term (6 months or so).

gr. Martin

On 09/17/2012 04:21 PM, Oliver Zhou wrote:

> Sorry, since I am not allowed to post link, please remove "_" after "http"


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] How to improve speed of generating java classes? [message #917460 is a reply to message #916350] Thu, 20 September 2012 01:33 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Okay, I know. It's still under control, I just worry once the domain model become bigger, a small change on the model will result a big generation time.

Could you please share some thought about the roadmap of future release of Texo?

Is there any plan to support EOperation which I think it's very userful?
Re: [Texo] How to improve speed of generating java classes? [message #918249 is a reply to message #917460] Thu, 20 September 2012 18:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
See here, a very small list of topics:
http://wiki.eclipse.org/Texo#Future_Topics

The web ui generation or having a standard web ui for EMF models is the main focus now.

I am planning to do a talk on that on the upcoming eclipsecon:
http://www.eclipsecon.org/europe2012/sessions/taking-emf-mobile-web-emft-texo-html5

See also my blog on Texo:
http://martintaal.wordpress.com/category/texo/

gr. Martin

On 09/20/2012 07:33 AM, Oliver Zhou wrote:
> Okay, I know. It's still under control, I just worry once the domain model become bigger, a small change on the model
> will result a big generation time.
>
> Could you please share some thought about the roadmap of future release of Texo?
>
> Is there any plan to support EOperation which I think it's very userful?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] How to improve speed of generating java classes? [message #919065 is a reply to message #917460] Fri, 21 September 2012 12:41 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
Regarding eoperation. I did not see the usage for this really. You need to code the eoperation any way in java, so why
do that in the model layer?
But let me know your thoughts, I am always interested in others ideas.

gr. Martin

On 09/20/2012 07:33 AM, Oliver Zhou wrote:
> Okay, I know. It's still under control, I just worry once the domain model become bigger, a small change on the model
> will result a big generation time.
>
> Could you please share some thought about the roadmap of future release of Texo?
>
> Is there any plan to support EOperation which I think it's very userful?


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] How to improve speed of generating java classes? [message #921274 is a reply to message #919065] Sun, 23 September 2012 21:25 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Hi Martin,

Here's my scenario, I'd like to hear your feedback.
We use Xtext to define our DSL to avoid using the Eclipse ecore editor directly.
In our DSL, we can allow the user to write some logics using Xbase, and then Xtext can translate it to Java, this is a very powerful feature provided by Xtext.
This is something pretty similar with Xcore (http_://wiki.eclipse.org/Xcore#Specifying_an_Operation).
And then in our code generator, we generate a ecore file on the fly, and create a eoperation for it.
I hope the corresponding java method can be generated by Texo and can be called via EObject.eInvoke method.
Re: [Texo] How to improve speed of generating java classes? [message #921534 is a reply to message #921274] Mon, 24 September 2012 03:37 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
Okay, I am interested, to get this done can you do the following:
- create an ecore file with examples of eoperations, preferably these examples should cover all the cases needed, for
the rest the ecore file should be as simple as possible
- enter a bugzilla and attach this ecore file to it

gr. Martin

On 09/24/2012 03:25 AM, Oliver Zhou wrote:
> Hi Martin,
>
> Here's my scenario, I'd like to hear your feedback.
> We use Xtext to define our DSL to avoid using the Eclipse ecore editor directly.
> In our DSL, we can allow the user to write some logics using Xbase, and then Xtext can translate it to Java, this is a
> very powerful feature provided by Xtext.
> This is something pretty similar with Xcore (http_://wiki.eclipse.org/Xcore#Specifying_an_Operation).
> And then in our code generator, we generate a ecore file on the fly, and create a eoperation for it.
> I hope the corresponding java method can be generated by Texo and can be called via EObject.eInvoke method.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] How to improve speed of generating java classes? [message #921670 is a reply to message #921534] Mon, 24 September 2012 06:21 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Hi Martin,

The attachement is the simplest version of a ecore and related generated java files, please let me know what else you want.

And I don't find Texo bug tracker url in Texo's wiki, could you please give me the link?

Best wishes,
Oliver
  • Attachment: test.ecore
    (Size: 1.75KB, Downloaded 114 times)
  • Attachment: Person.java
    (Size: 2.55KB, Downloaded 89 times)
  • Attachment: PersonImpl.java
    (Size: 5.70KB, Downloaded 59 times)
Re: [Texo] How to improve speed of generating java classes? [message #921920 is a reply to message #921670] Mon, 24 September 2012 10:53 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
Here is the link:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT&component=Texo&version=0.5

Will add it on the wiki.

gr. Martin

On 09/24/2012 12:21 PM, Oliver Zhou wrote:
> Hi Martin,
>
> The attachement is the simplest version of a ecore and related generated java files, please let me know what else you want.
>
> And I don't find Texo bug tracker url in Texo's wiki, could you please give me the link?
>
> Best wishes,
> Oliver
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Texo] How to improve speed of generating java classes? [message #923909 is a reply to message #921920] Wed, 26 September 2012 05:51 Go to previous messageGo to next message
Oliver Zhou is currently offline Oliver Zhou
Messages: 41
Registered: February 2012
Member
Already create it as request
Re: [Texo] How to improve speed of generating java classes? [message #941808 is a reply to message #923909] Fri, 12 October 2012 18:03 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Hi Oliver,
For your information, Texo now uses xtend2 for code generation:
http://martintaal.wordpress.com/2012/10/12/emft-texo-using-xtend2-for-faster-generation/

gr. Martin

On 09/26/2012 11:51 AM, Oliver Zhou wrote:
> Already create it as request


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Previous Topic:[Texo] Does TexoResource support Element Collections?
Next Topic:EMFT Texo: uses xtend2 for code generation --> when overriding templates please read
Goto Forum:
  


Current Time: Thu Aug 21 22:10:12 EDT 2014

Powered by FUDForum. Page generated in 0.04210 seconds