Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Save one file, all files rebuilt?(Large DSL project exhibits confusingly poor performance)
Save one file, all files rebuilt? [message #1004737] Wed, 23 January 2013 19:28 Go to next message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

Hi,

When running my Xtext-based IDE, I have a very large DSL project (~30 files, ~500,000 lines of DSL code). Some individual files are as large as 200,000 lines of code (users of this DSL have used scripts to generate source files in some cases, hence the large files).

Here is a confusing scenario I've seen: The project is fully-built, all files are saved. I modify one line in one file (comment-out an Include statement, for example), and then save the file. What follows is a long build process, where almost all files in the project appear to be rebuilt. The Progress View takes very long to complete and notes that it's "updating resource description for" many files that weren't modified. I would expect that the resource descriptions would only need to be updated for modified files.

This happens with every save, making the IDE pretty unusable for this project. I wonder if anyone has any thoughts on what might be going on. I've profiled the application a bunch of times, but have not uncovered anything meaningful yet.

Any thoughts readers might have would be appreciated!

PS - I'm using Xtext 2.3.1

[Updated on: Wed, 23 January 2013 20:27]

Report message to a moderator

Re: Save one file, all files rebuilt? [message #1004951 is a reply to message #1004737] Thu, 24 January 2013 07:46 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

in case there are cross references among files this is not surprising. Changing one file may affect exported objects that are cross referenced by others. So it is not enough to update the resource description of the modified file.

However, you can hook into the process, adapt the creation of resource description, the calculation whether a resource is affected by the change of another.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de
Re: Save one file, all files rebuilt? [message #1005119 is a reply to message #1004951] Thu, 24 January 2013 14:08 Go to previous messageGo to next message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

Alex,

Thanks for your reply - it sounds like this resource description processing is a good place to explore. I'm familiar with injecting my own DslResourceDescriptionStrategy and implementing the createEObjectDescriptions(...) method to control what objects get exported.

But controlling some of these other aspects you mention - whether one resource is affected by the change of another, for example - what might be the class or injection point for this?

Joey
Re: Save one file, all files rebuilt? [message #1005287 is a reply to message #1005119] Thu, 24 January 2013 19:29 Go to previous messageGo to next message
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA
Member

Ah - I see. It looks like I must implement and bind my own IResourceDescription.Manager to control which resources are affected by other resource changes.
Re: Save one file, all files rebuilt? [message #1005338 is a reply to message #1004737] Thu, 24 January 2013 22:29 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
Files with 200.000 LOC would even make JDT throw up. You should
seriously consider modularization.

If that's not possible, it's likely not solved with a few simple tricks.
You will at least have to dig a lot deeper into the builder, the index,
parsing and linking.

Am 23.01.13 20:28, schrieb Joey Mink:
> Hi,
>
> When running my Xtext-based IDE, I have a very large DSL project (~30
> files, ~500,000 lines of DSL code). Some individual files are as large
> as 200,000 lines of code (users of this DSL have used scripts to
> generate source files in some cases, hence the large files).
>
> Here is a confusing scenario I've seen: The project is fully-built, all
> files are saved. I modify one line in one file (comment-out an Include
> statement, for example), and then save the file. What follows is a long
> build process, where almost all files in the project appear to be
> rebuilt. The Progress View takes very long to complete and notes that
> it's "updating resource description for" many files that weren't
> modified. I would the resource descriptions would only need to be
> updated for modified files.
>
> This happens with every save, making the IDE pretty unusable for this
> project. I wonder if anyone has any thoughts on what might be going
> on. I've profiled the application a bunch of times, but have not
> uncovered anything meaningful yet.
>
> Any thoughts readers might have would be appreciated!

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Unordered Groups & Custom Checks
Next Topic:Java.Lang.NullpointerException in UNIT TEST
Goto Forum:
  


Current Time: Fri Apr 26 02:33:17 GMT 2024

Powered by FUDForum. Page generated in 0.03443 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top