Migration from 2.7.3 to 2.8.3 [message #1699597] |
Thu, 25 June 2015 09:55 |
Flo Plateau Messages: 16 Registered: December 2013 |
Junior Member |
|
|
Dear Xtext Team,
running Generate Xtext Artifacts on my grammar file takes about 1 minute with Xtext 2.7.3, and about 5 minutes with Xtext 2.8.3. Furthermore,
to make the run succeed, I've had to increase the memory given to the mwe2 launch from -Xmx512m to -Xmx1024m, otherwise the run fails with an OutOfMemoryError :
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.newNode(HashMap.java:1734)
at java.util.HashMap.putVal(HashMap.java:630)
at java.util.HashMap.put(HashMap.java:611)
at java.util.HashSet.add(HashSet.java:219)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:630)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:756)
at org.antlr.analysis.NFAToDFAConverter.closure(NFAToDFAConverter.java:709
The method that really takes much more time than before is org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.runWithEncodingAndParams(String, String, String[]) and the increase in computation time seems to be mostly due to org.antlr.analysis.NFAToDFAConverter.closure(NFAState, int, NFAContext, SemanticContext, DFAState, boolean).
With Xtext 2.7.3, the arguments to runWithEncodingAndParams are internalMyDSL.g, UTF-8, -fo, and the output directory.
With Xtext 2.8.3, the arguments to runWithEncodingAndParams are internalMyDSL.g, UTF-8, -Xconversiontimeout, 100000, -fo, and the output directory.
The files internalMyDSL.g are equal but for 2 spaces in a comment.
The option conversiontimeout seems to have (had) a default value of 10000 (cf. https://github.com/antlr/antlr/commit/22f5b8b2bea798f3553f1c80e6de34d35d1a1752) and has been removed in Antlr 3.3 (https://theantlrguy.atlassian.net/wiki/display/ANTLR3/ANTLR+3.3+Release+Notes). When removing the -Xconversiontimeout and 100000 arguments (by modifying org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.getAntlrParams()) the compilation time drops back to the initial time (and succeeds with the initial amount of memory).
Is this a bug ? If not, could this option be easily customizable ?
Thanks in advance,
Florence
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02027 seconds