Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText builder run takes many minutes on eclipse start
XText builder run takes many minutes on eclipse start [message #977795] Fri, 09 November 2012 10:29 Go to next message
Dimitry Polivaev is currently offline Dimitry Polivaev
Messages: 5
Registered: July 2009
Junior Member
Hi,

I use XText for creating a DSL for test case generation. Generator scripts containing test strategies are created from our strategy mind maps as described in arxiv.org/abs/1202.6125v1 (you do not have to read the article Smile ).

The scripts can become pretty long (thousands of LOC). Some other script files are created directly in editor. We have created an XText based editor and debugger.

With growing size of our script files (currently about 4000 lines) an eclipse start or refresh takes many minutes, and it is likely to become longer as our strategy maps continuously grow. I do not know how we could accelerate this process. We activate no backtracking.

(Currently the scripts are compiled using a second parser based on JavaCC which does not have any problems with their size. The XText based solution should be used only for editing and debugging in Eclipse).

Is there are someone who could have a look at our grammar definition and the parsed files and give us a hint how to improve the XText performance? I would provide the files but unfortunately I can not make them available directly in the forum.

Regards,
Dimitry Polivaev
Test Architect
System Test for EMV / ID Products and Mobile Security Secure Devices
Giesecke & Devrient GmbH, Prinzregentenstr. 159, D-81677 Munich, Germany
Re: XText builder run takes many minutes on eclipse start [message #981378 is a reply to message #977795] Mon, 12 November 2012 06:13 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten Thoms
Messages: 353
Registered: July 2009
Location: Dortmund
Senior Member

Hi Dimitry,

the grammar alone won't be enough to tackle your performance issues. There are so many different aspects that influence performance that it needs the whole project and relevant test data in the size where performance problems can be observed. Or do you have just the default implementation generated from your grammar without customizations?
The first place to look at is scoping. Note that every element for which a qualified name is computed will be in the Index. If elements don't need to be referenced it is a good idea to avoid that those are exported to the Index.
You could use a profiling tool to identify some of your hot spots.

BTW: Which Xtext version are we talking about? Performance and scalability is improving steadily which each release.

Regards,
~Karsten


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
Re: XText builder run takes many minutes on eclipse start [message #981603 is a reply to message #977795] Mon, 12 November 2012 09:49 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1761
Registered: July 2009
Senior Member
Hi Dimitry,

itemis provides professional support services around Xtext and Eclipse
Modeling in general. We have a lot of experience in measuring and
optimizing performance and would be glad to help you.

Please send me an E-mail if you are interested in this kind of support
so we can discuss the details.

Regards,
Sven

Am 11/9/12 4:44 PM, schrieb Dimitry Polivaev:
> Hi,
>
> I use XText for creating a DSL for test case generation. Generator
> scripts containing test strategies are created from our strategy mind
> maps as described in arxiv.org/abs/1202.6125v1 (you do not have to read
> the article :) ).
>
> The scripts can become pretty long (thousands of LOC). Some other script
> files are created directly in editor. We have created an XText based
> editor and debugger.
> With growing size of our script files (currently about 4000 lines) an
> eclipse start or refresh takes many minutes, and it is likely to become
> longer as our strategy maps continuously grow. I do not know how we
> could accelerate this process. We activate no backtracking.
>
> (Currently the scripts are compiled using a second parser based on
> JavaCC which does not have any problems with their size. The XText based
> solution should be used only for editing and debugging in Eclipse).
>
> Is there are someone who could have a look at our grammar definition and
> the parsed files and give us a hint how to improve the XText
> performance? I would provide the files but unfortunately I can not make
> them available directly in the forum.
>
> Regards,
> Dimitry Polivaev
> Test Architect
> System Test for EMV / ID Products and Mobile Security Secure Devices
> Giesecke & Devrient GmbH, Prinzregentenstr. 159, D-81677 Munich, Germany


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: XText builder run takes many minutes on eclipse start [message #985247 is a reply to message #981603] Thu, 15 November 2012 04:04 Go to previous messageGo to next message
Dimitry Polivaev is currently offline Dimitry Polivaev
Messages: 5
Registered: July 2009
Junior Member
Hi,

after getting a hint from Tim I was able to change the grammar so that the parsing time was reduced from several minutes to a few seconds. The case is similar to one described in http://www.eclipse.org/forums/index.php/m/929620/ . In my case the grammar contained syntactic predicates related to code blocks defined as

Block:{Block}
    '{' (stmt += BlockStmt | stmt += SeparatorToken)* '}'
;
BlockStmt:
    IfStmt|ElseStmt|WhileStmt|ForStmt|VarGroupDef|=>EmbeddedToken |Statement | LabelStmt |GotoLabelStmt
;

Statement:{Statement}
    stmt += Block 
    |
    ((
        => stmt += StatementPart (=>stmt += Block)?
    )+)
;


After moving the "{" out of the Block definitions it became

Block:{Block}
    (stmt += BlockStmt | stmt += SeparatorToken)*
;
BlockStmt:
    IfStmt|ElseStmt|WhileStmt|ForStmt|VarGroupDef|=>EmbeddedToken |Statement | LabelStmt |GotoLabelStmt
;

Statement:{Statement}
    stmt += Block 
    |
    ((
        => stmt += StatementPart (=> "{" stmt += Block "}")?
    )+)
;


After I changed all references to Blocks this way the problem was solved.

Thank you very much for the help!

Regards, Dimitry
Re: XText builder run takes many minutes on eclipse start [message #985253 is a reply to message #981603] Thu, 15 November 2012 04:05 Go to previous message
Dimitry Polivaev is currently offline Dimitry Polivaev
Messages: 5
Registered: July 2009
Junior Member
No Message Body

[Updated on: Thu, 15 November 2012 08:42]

Report message to a moderator

Previous Topic:using filters in cross referencing
Next Topic:Xtext and left recursive
Goto Forum:
  


Current Time: Wed Aug 20 16:43:10 EDT 2014

Powered by FUDForum. Page generated in 0.06546 seconds