How to speed up serialization [message #972711] |
Mon, 05 November 2012 16:10  |
Eclipse User |
|
|
|
Hi,
I've working on a graphical editor on top of an Xtext/Xbase-based DSL.
As recommended, the diagram is in XMI-file that is linked to data
objects are in an XtextResource, the latter serialized as text. During
debugging I've only created small models that are serialized fairly
quickly. Now I've implemented creating diagrams for existing DSL files,
and it seems to take forever, even for relatively small files. I've read
that Xtext uses a backtracking serialization algorithm, so I assume
there something about my grammar that results in a lot of trying and
failing. I have a some questions relating to this:
- How can I find out which grammar rules are causing problems?
- Is there a way to customize the Serializer so it makes better choices
concerning which paths to follow?
Hallvard
|
|
|
Re: How to speed up serialization [message #972727 is a reply to message #972711] |
Mon, 05 November 2012 16:20   |
Eclipse User |
|
|
|
Hi Hallvard,
which serializer do you use? Is it based on the ParseTreeConstructor or
on the Sequencer approach (when in doubt, you may browse the mwe2 file
that generates your language).
Best regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 05.11.12 22:12, schrieb Hallvard Trætteberg:
> Hi,
>
> I've working on a graphical editor on top of an Xtext/Xbase-based DSL.
> As recommended, the diagram is in XMI-file that is linked to data
> objects are in an XtextResource, the latter serialized as text. During
> debugging I've only created small models that are serialized fairly
> quickly. Now I've implemented creating diagrams for existing DSL files,
> and it seems to take forever, even for relatively small files. I've read
> that Xtext uses a backtracking serialization algorithm, so I assume
> there something about my grammar that results in a lot of trying and
> failing. I have a some questions relating to this:
>
> - How can I find out which grammar rules are causing problems?
> - Is there a way to customize the Serializer so it makes better choices
> concerning which paths to follow?
>
> Hallvard
|
|
|
|
|
|
|
Re: How to speed up serialization [message #973399 is a reply to message #972813] |
Tue, 06 November 2012 04:47  |
Eclipse User |
|
|
|
Hi Hallvard,
did you try a profiler to see where the time is spent?
Customizing is done via the *Sequencers. Have a look at the
XbaseSemanticSequencer to see how things can be implemented.
Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 05.11.12 23:52, schrieb Hallvard Trætteberg:
> On 05.11.12 14.43, Sebastian Zarnekow wrote:
>> Am 05.11.12 23:20, schrieb Hallvard Trætteberg:
>>> On 05.11.12 13.20, Sebastian Zarnekow wrote:
>>>> Hi Hallvard,
>>>>
>>>> which serializer do you use? Is it based on the ParseTreeConstructor or
>>>> on the Sequencer approach (when in doubt, you may browse the mwe2 file
>>>> that generates your language).
>>>
>>> I switched to fragment = serializer.SerializerFragment {} and now it
>>> runs faster! Should have thought of that in the first place.
>>>
>>> Hallvard
>>>
>>
>> Thanks for the feedback.
>
> Hm. Although it is quicker, it still takes around 15 seconds for a file
> that's "small". Still a bit too much, so I still could need some hints for
>
> - how to find out which grammar rules are causing problems?
> - a way to customize the Serializer so it makes better choices?
>
> Hallvard
>
|
|
|
Powered by
FUDForum. Page generated in 0.09770 seconds