|Re: Xtend nearly unusable in big files [message #721013 is a reply to message #720791]
||Wed, 31 August 2011 16:54
| Ed Willink
Registered: July 2009
Not reported against EGit yet. I'm waiting for SR1 before starting to
winge. I think that three or four projects have poor characteristics and
when these combine exponentially we get to the coffee break build
I suspect that my problem may be different to other peoples because I
have split plugins.
I have an AST plugin in which a *.uml defines the auto-generated *.ecore
I have 5 CST + Editor plugins in which
- *.ecore defines the auto-generated *.java
- *.xtext defines more auto-generated *.java
To avoid polluting the CST plugins with build-only dependencies, I have
a Build 'plugin' that houses *.mwe2 and *.mtl (Acceleo templates) and
One mwe2 script drives the *.uml to *.java in the AST plugin and via
Acceleo generates more *.java.
Another mwe2 script drives the 5 CST genmodels for *.ecore to *.Java and
via Acceleo generates more *.java.
Another mwe2 script drives the 5 *.xtext to *.java.
Because MWE2 re-uses the classpath as a modelpath and my models are
referenced as platform:/plugin... the necessary MWE2 modelpath creates a
cyclic Java dependency. Eclipse perceives the Build plugin as dependent
on the CST and AST plugins since they are on the classpath/modelpath,
but running an MWE2 script generates Java upstream in the plugins on
which the Build plugin depends.
I think MWE2 needs to use a modelpath that is analoguous to a classpath
but without making Eclipse think that there is a dependency. I would
gladly provide explicit 'import' statements in the Standalone bean setup
so long as there is a syntax that enables platform:/plugin to correctly
resolve to platform:/resource if present else platform:/plugin in the
normal EMF fashion.
On 31/08/2011 09:44, Jan Koehnlein wrote:
> Sounds like a bug in eGit. Did you report it?
> We are working hard to improve performance. If you switch to the HEAD
> revision of Xtext, you will already experience a serious speed-up.
> Am 31.08.11 10:19, schrieb Ed Willink:
>> Hi Daniel
>> Thanks for some extra insight. I thought it was just me with problems.
>> I see exactly the same issues and I don't use Xtend at all (except in so
>> far as Xtext does on my behalf). I use MWE2 and Acceleo and Xtext.
>> I stepped a bit of MWE when I had some URI resolution bug and saw some
>> double work going on, though I think it was plugin scanning, but perhaps
>> that triggers builds.
>> Anyway, perhaps MWE rather than Xtend or Acceleo is at fault.
>> I find the situation gets particularly bad after a GIT switch-to-branch,
>> since rebuilds start long before GIT has finished and so a sequence of
>> partial builds block GIT progress and fight to complete before GIT and a
>> clean build can complete. Disabling auto-build till GIT completes is
>> almost mandatory.
>> Ed Willink
>> On 31/08/2011 08:56, Daniel wrote:
>>> Hi developers.
>>> I'm currently writing some xtend code generation templates and it
>>> really frustrates me.
>>> Nearly time I save my xtend code files Eclipse needs to Build my
>>> Workspace twice! It seems xtend build the workspace before the
>>> validation starts (to check whether all referenced elements are
>>> available). Then the validation starts and the code generation of
>>> xtend to java is triggered. And afterwards the whole workspace is
>>> rebuilt again because of the new classes.
>>> Each time I save my file the whole Eclipse instance gets unusable
>>> (sometimes even unresponsive) till this build process is finished. I
>>> tried to disable the automatic build but even then xtend triggers the
>>> code generation and therefore the workspace rebuild.
>>> It takes me hours to write templates that really frustrates. I have
>>> two template files in my project. One is 1400 lines long and the other
>>> 400. Of course xtend needs some heavy operations for validation but on
>>> bigger files you get really stuck using xtend.
>>> But on each save new progress tasks get enqueued. If I make changes
>>> and hit save a "workspace building" and an "xtext validation" task is
>>> enqueued. Sometimes the elements are enqueued twice. I make some
>>> additional changes till Eclipse is responsive and hit save again. Then
>>> I have 4-6 tasks in my progress queue and can get a cup of coffee till
>>> those tasks are complete.
>>> The parts: "Updating resource description x of y" and "Invoking build
>>> participants" take the most of the time which is up to 2 minutes.
>>> Is this simply my fault or is it really xtend that becomes quite
>>> unusable on huge template files?
Powered by FUDForum
. Page generated in 0.19567 seconds