Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Parsing large files
Parsing large files [message #759820] Wed, 30 November 2011 08:26 Go to next message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
Hi!

I am looking at migrating from a custom language support to one based on xtext. One of the issues we have today is that files can be huge (I've seen one that is ~2MB and 30000 lines) and it's slow. I was hoping that it could be faster with xtext, as it uses less naive implementations that I do, but from my trials it doesn't seem so.

My reference is the Java editor, where one can edit huge files without delays in the UI. For my xtext-generated editor, I get for example ~4 seconds where the editor freezes after pressing "enter" at the end of a huge file.

Is there something I can do about that? I suppose that it's the validation and cross-linking that take most time - could these be done in the background, just like the semantic highlight?

best regards,
Vlad
Re: Parsing large files [message #759822 is a reply to message #759820] Wed, 30 November 2011 08:35 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3107
Registered: July 2009
Senior Member
Hi Vlad,

it's the editor redraw that takes the time. You have to customize the
damager repairer to your specific needs to get along with those.
Validation (and thereby cross linking) is already done async to the user
input.

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

Am 30.11.11 09:26, schrieb Vlad Dumitrescu:
> Hi!
>
> I am looking at migrating from a custom language support to one based on
> xtext. One of the issues we have today is that files can be huge (I've
> seen one that is ~2MB and 30000 lines) and it's slow. I was hoping that
> it could be faster with xtext, as it uses less naive implementations
> that I do, but from my trials it doesn't seem so.
> My reference is the Java editor, where one can edit huge files without
> delays in the UI. For my xtext-generated editor, I get for example ~4
> seconds where the editor freezes after pressing "enter" at the end of a
> huge file.
>
> Is there something I can do about that? I suppose that it's the
> validation and cross-linking that take most time - could these be done
> in the background, just like the semantic highlight?
>
> best regards,
> Vlad
>
Re: Parsing large files [message #759824 is a reply to message #759820] Wed, 30 November 2011 08:48 Go to previous message
Vlad Dumitrescu is currently offline Vlad DumitrescuFriend
Messages: 430
Registered: July 2009
Location: Gothenburg
Senior Member
Thanks for the answer.

I will also try to use syntactic predicated so that I can switch off backtracking.

regards,
Vlad
Previous Topic:Postorder traversal of AST during validation.
Next Topic:[Xtext 2.1] Fully qualified names export and ScopeProvider
Goto Forum:
  


Current Time: Sun Mar 29 06:53:19 GMT 2020

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

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

Back to the top