Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Performance of Xtext editor(Editing in Xtext editor)
Performance of Xtext editor [message #1775263] Fri, 27 October 2017 03:53 Go to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Hi
Recently, I want to edit my DSL model(based on Xtext grammar) in Xtext Editor, then I found when i break the matched quotation marks, the function 'computeDamageRegion' will loop for a long time, which will block the UI. Like:

ApplicationInstance "simple.cps.app.AC0-0.inst0" {
},
ApplicationInstance "simple.cps.app.AC0-0.inst1" {
},
ApplicationInstance "simple.cps.app.AC0-0.inst2" {
allocatedTo "simple.cps.host.HC00.inst11"
}
When i delete a quotation(") in my model(About 150,000 Eobject, 250,000 References), the function consumed about 1,080,000ms and the during the time, the UI is blocked. Could you offer me any suggestion about this ?

Thanks in advance!

[Updated on: Fri, 27 October 2017 04:04]

Report message to a moderator

Re: Performance of Xtext editor [message #1775266 is a reply to message #1775263] Fri, 27 October 2017 05:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Do this strings look like qualified names in quotations by intention?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Performance of Xtext editor [message #1775268 is a reply to message #1775266] Fri, 27 October 2017 05:28 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
No, it is just the instance name. If I change the section in quotations, the above function won't consume a long time. After my debuggin, i find when breaking the matched quotations, it won't locate the affected region, and will loop until the end of the document, which need a long time. Am i right?

[Updated on: Fri, 27 October 2017 05:36]

Report message to a moderator

Re: Performance of Xtext editor [message #1775269 is a reply to message #1775268] Fri, 27 October 2017 05:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
No I mean

"Bla { blubbern }" is valid inside this quotations
This makes error recovery bad and basically the whole file needs to be reprocessed

BTW edition an 200k line file is generally no a performant thing ....


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Performance of Xtext editor [message #1775271 is a reply to message #1775269] Fri, 27 October 2017 06:12 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Quote:
BTW edition an 200k line file is generally no a performant thing ....

Have you edited the file at the beginning and break the matched quotation(Like delete a quotation)? Just now, i use an model with about 280,000 line, and delete a quotation at the beginning, it is still bad performance(consumes about 10min).
I find edit postion is related with the comsumed time. If i delete a quotation at the end of file, i have no performance problem, buf if at the beggning, i will have bad performance("computeDamageRegion" consumes much time).
Re: Performance of Xtext editor [message #1775282 is a reply to message #1775271] Fri, 27 October 2017 07:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

"BTW edition an 200k line file is generally no a performant thing ...."

Unless you break the file into paragraphs.

e.g. in many languages the grammar boils down to a tree of

paragraph := word* ('{' paragraph* '}' | ';')

When the braces fail to match, parsing is rubbish. Therefore the parser should have an outer paragraph partitioner doing its best bottom up and top down.

Most edits are paragraph preserving and so at most a couple of damaged paragraph(s) needs reparsing. If an edit destroys paragraph well-formedness, the user is better off with a fast display of just one or two error indicators for the bad paragraphing than a really slow obfuscation by thousands of secondary errors from unresolved symbols.

Regards

Ed Willink
Re: Performance of Xtext editor [message #1775289 is a reply to message #1775282] Fri, 27 October 2017 08:58 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Hi Ed,
Thanks for your reply!
But in general edition, user usually like to delete the content using 'Backspace' key, which will break matched quotation(as you said it destroy paragraph well-formedness), then cause the bad performance. So i think we should consider this scenario. and if i want to avoid this performance problem in my edtion(delete a quotation), Could you offer me a solution?
Re: Performance of Xtext editor [message #1775414 is a reply to message #1775269] Mon, 30 October 2017 03:50 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
Hi Christian,
In your test, did your edition include deleting an quotation to break the balance of the quotations ? i use an model with about 280,000 line, and delete a quotation at the beginning of the text, it is still bad performance(consumes about 10min).
Hope for your reply!
Re: Performance of Xtext editor [message #1775419 is a reply to message #1775414] Mon, 30 October 2017 07:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
????? Did you change the string rule?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Performance of Xtext editor [message #1775420 is a reply to message #1775419] Mon, 30 October 2017 07:31 Go to previous messageGo to next message
zhang ph is currently offline zhang phFriend
Messages: 43
Registered: March 2017
Member
No, i didn't change anything else, my operation is just delete an quotation(") instead of deleting the matched quotations(""),like changing "test" to "test

[Updated on: Mon, 30 October 2017 07:41]

Report message to a moderator

Re: Performance of Xtext editor [message #1775422 is a reply to message #1775420] Mon, 30 October 2017 07:42 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
i tried to expolain you the same as ed did: deleting the quote changes the whole file.
thus i asked you is it wanted for you that

" bla { blubb }" is legal. if not try to change the string rule


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Exclude generated JAR files from indexing
Next Topic:Xbase doesn't bind overriden TypeConvertingCompiler
Goto Forum:
  


Current Time: Thu Apr 18 06:34:48 GMT 2024

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

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

Back to the top