Community
Participate
Working Groups
Build Identifier: 20110615-0604 This request is a follow up of this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=353321 The problem describes the behavior of the xtend to java code generator which gets automatically triggered every time you save the xtend files. If your templates grow xtext becomes nearly unusable because the build process takes up to minutes. In a template file of about 1400 lines (including a lot of dispatch methods, rich strings, loops, contidions,..) + a file containing 400 lines the code generation takes about - 40-70seconds for "updating resource descriptions" - 2-10 seconds for "xtext validation" - 50-70 seconds for "invoking build participants" The attached example shows It should be possible to disable the automatic code generation of xtext to java (probably a setting within the project context menu?). This will ensure the workspace does not get rebuilded after each save. The attached sample project shows the problem in reality. It includes a grammar for simple interface declarations and a xtend template with a lot of methods. Simply open any of the two xtend files, edit it and hit save. You'll see that Eclipse will rebuild the workspace on each save and it takes up to minutes. As bigger your template grows, as longer the build takes and the template editing becomes impossible. Reproducible: Always Steps to Reproduce: 1. Import the project 2. Open any of the xtend files 3. Edit any line as liked 4. Hit save
Created attachment 202500 [details] Example Project containing big xtend templates
Thanks for the test data. We are aware of the bad build performance of Xtend and have already improved the performance of it significantly (compared to 2.0.1). Note that the actual generation of Java code is not the problem, but the linking. I checked your project with the latest build and it takes around 2.5 secs to build one of the mentioned files on my machine. A clean build of the whole project takes around 4 secs. My machine might be a bit faster then yours though. We have further ideas for improvements and want to go that way instead of disabling indexing for Xtend. Because then you'll end up with all kind of surprising behavior. So that's not an option. You could try the latest builds but it might contain a bug or something. Also the provisional APIs might have changed. If you can't or don't want to upgrade you might want to try disabling automatic project build in your IDE. Sorry for the inconvenience. I close this bug, for the reasons mentioned above, but please note that the test data was really helpful and that we of course take the mentioned performance problems extremely seriously (we've faced them ourselves on a daily basis and know how annoying that is). Feel free to comment further.
I have the same issue and working with .xtend files in IDEA is terrible, because every symbol input causes "Code generation..." task in IDEA tray (with temporary losing code highlighting). Problem is not in speed of generation (fast enough) - I'm talking about frequency of this! Beg you, add setting to disabling code generation!
Requested via bug 522520. -M.