Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » pre-generate resource descriptions
pre-generate resource descriptions [message #959155] Fri, 26 October 2012 13:50 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
Hi!

Is there a way to use pre-generated resource descriptions? We have large projects, with hundreds of files and it takes forever to import them in the workspace. Since most files won't be changed in a session, it feels reasonable to let the build sytem generate resource descriptions for all, if Xtext can recognize them and load them instead of parsing the files (if file has older timestamp).

If it's possible, where do i have to look? Using Guice makes the code a bit difficult to navigate...

best regards,
vlad
Re: pre-generate resource descriptions [message #959240 is a reply to message #959155] Fri, 26 October 2012 15:04 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
afaik - that is what Xtext does when running Builders in the IDE.
The metadata is saved between sessions as well.

But maybe you are not using the Xtext builder infrastructure?
- henrik

On 2012-26-10 15:50, Vlad Dumitrescu wrote:
> Hi!
>
> Is there a way to use pre-generated resource descriptions? We have large
> projects, with hundreds of files and it takes forever to import them in
> the workspace. Since most files won't be changed in a session, it feels
> reasonable to let the build sytem generate resource descriptions for
> all, if Xtext can recognize them and load them instead of parsing the
> files (if file has older timestamp).
>
> If it's possible, where do i have to look? Using Guice makes the code a
> bit difficult to navigate...
> best regards,
> vlad
>
Re: pre-generate resource descriptions [message #959276 is a reply to message #959240] Fri, 26 October 2012 15:34 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
ah, maybe you meant that you would also like to avoid the build the very
first time files are seen in the workspace?

- henrik

On 2012-26-10 17:04, Henrik Lindberg wrote:
> afaik - that is what Xtext does when running Builders in the IDE.
> The metadata is saved between sessions as well.
>
> But maybe you are not using the Xtext builder infrastructure?
> - henrik
>
> On 2012-26-10 15:50, Vlad Dumitrescu wrote:
>> Hi!
>>
>> Is there a way to use pre-generated resource descriptions? We have large
>> projects, with hundreds of files and it takes forever to import them in
>> the workspace. Since most files won't be changed in a session, it feels
>> reasonable to let the build sytem generate resource descriptions for
>> all, if Xtext can recognize them and load them instead of parsing the
>> files (if file has older timestamp).
>>
>> If it's possible, where do i have to look? Using Guice makes the code a
>> bit difficult to navigate...
>> best regards,
>> vlad
>>
>
Re: pre-generate resource descriptions [message #959602 is a reply to message #959276] Fri, 26 October 2012 21:12 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
Hi Henrik,

Yes, I meant it as a step done "offline" so that the index is available when opening the workspace the first time.

Even that is quite slow, I get startup times longer with 30 seconds for just one project... When we get to the standard libraries, it will be even longer. It would be great if there was a way to do this faster, or in the background, or something...

regards,
Vlad
Re: pre-generate resource descriptions [message #959814 is a reply to message #959602] Sat, 27 October 2012 01:22 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Sorry, but I never had to figure out where things are stored, and if
they can be copied. Surely they are in the workspace metadata. Have not
seen any obvious place to import the caches - but OTOH I have never
looked for it explicitly.

- henrik

On 2012-26-10 23:12, Vlad Dumitrescu wrote:
> Hi Henrik,
>
> Yes, I meant it as a step done "offline" so that the index is available
> when opening the workspace the first time.
> Even that is quite slow, I get startup times longer with 30 seconds for
> just one project... When we get to the standard libraries, it will be
> even longer. It would be great if there was a way to do this faster, or
> in the background, or something...
>
> regards,
> Vlad
>
Re: pre-generate resource descriptions [message #960241 is a reply to message #959814] Sat, 27 October 2012 09:48 Go to previous messageGo to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
No problem, thanks anyway.

Yes, the cached data is in the workspace somewhere, but that doesn't mean that putting it there manually will make Xtext recognize it automatically. I hope it does, but one never knows.

As it's quite a bit of work to try it out, I feel better if I know I'm not trying something that is impossible Smile

regards,
Vlad
Re: pre-generate resource descriptions [message #960389 is a reply to message #960241] Sat, 27 October 2012 12:37 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13591
Registered: July 2009
Senior Member
If you want to digg into the code:
org.eclipse.xtext.builder.builderState.PersistedStateProvider
org.eclipse.xtext.builder.builderState.EMFBasedPersister
org.eclipse.xtext.builder.builderState.AbstractBuilderState.load()


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: pre-generate resource descriptions [message #960509 is a reply to message #960389] Sat, 27 October 2012 14:52 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
Thank you, Christian!
Previous Topic:first and last character truncated in STRING terminals
Next Topic:testing autocompletion (and other UI stuff)
Goto Forum:
  


Current Time: Sat Sep 19 12:14:07 GMT 2020

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

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

Back to the top