Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Model serialization is very slow(When trying to serialize a EMF model using XtextResource, It takes a huge amount of time)
Model serialization is very slow [message #986393] Tue, 20 November 2012 10:22 Go to next message
Charles Bonneau is currently offline Charles BonneauFriend
Messages: 32
Registered: February 2010
Location: Belgium
Member
Hello,
I have a problem with the serialization of a EMF model using a XtextResource.
I have generated a Xtext project from an Ecore file.
I have an instance model of 233 objects, which is not that big (imho).
But when I try to serialize it using the XtextResource, I have the impression that the process is stuck in an infinite loop, or at least it is very slow: ~15 minutes
I've paused the process and it seems to be looping in the method
public abstract class AbstractParseTreeConstructor implements IParseTreeConstructor {
[...]
   protected AbstractToken serialize(EObject object, AbstractToken currentToken, TreeConstructionReportImpl rep){
[...]
   }
}


I have no idea on how to debug it and improve the serialization process.

I could use a little help here.

In advance, thank you for your comments/remarks.

Best regards,

Charles

[Updated on: Tue, 20 November 2012 10:59]

Report message to a moderator

Re: Model serialization is very slow [message #986414 is a reply to message #986393] Tue, 20 November 2012 11:02 Go to previous messageGo to next message
Michael Vorburger is currently offline Michael VorburgerFriend
Messages: 62
Registered: July 2009
Member
Charles, what version of Xtext are you using? Are you aware that there are two Serializer implementations in Xtext, an old/slower and newer/faster one? Browse some older Forum posts for more about this.. If you created your project with an older version and then later switched to a newer one, you're probably still using the older implementation? To switch, create a new sample test project with the Xtext (latest 2.3.1), and note how in the new *.mwe2 there is a // Serializer 2.0 fragment = serializer.SerializerFragment ... add that to your existing *.mwe2, regenerate - perf any better? Now retest everything... Wink
Re: Model serialization is very slow [message #986431 is a reply to message #986414] Tue, 20 November 2012 12:15 Go to previous messageGo to next message
Charles Bonneau is currently offline Charles BonneauFriend
Messages: 32
Registered: February 2010
Location: Belgium
Member
I'm using Xtext 2.3.0. I'll try with the latest version. I'll let you know. Thank you very much.
Re: Model serialization is very slow [message #1007092 is a reply to message #986431] Mon, 04 February 2013 12:14 Go to previous message
Charles Bonneau is currently offline Charles BonneauFriend
Messages: 32
Registered: February 2010
Location: Belgium
Member
Huge improvement ! thanks a lot !!!!

Br,

Charles
Previous Topic:[Xbase] LValue-like expressions in DSL
Next Topic:Infinite loop when refreshing the outline
Goto Forum:
  


Current Time: Sun Nov 23 02:27:41 GMT 2014

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

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