Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Validation just for the changed elements?
Validation just for the changed elements? [message #820676] Wed, 14 March 2012 12:27 Go to next message
Heinz Huber is currently offline Heinz HuberFriend
Messages: 45
Registered: February 2012
Member
Hi,

I got some validations which cause much cpu usage at the runtime (calculating permutations for logical expressions). Thats why i am asking if there is a way to tell the validator "just execute this validation for the element after some change inside the element was done".

At the moment the validator runs every time i change 1 sign anywhere in the document -> And then he checks all validations.

My fear is, that if my file gets longer and longer and longer -> That there will be a real problem with the cpu load.

So ... is there a way to change the way of validation?
Hope there is one! :>

Thanks in advance!

Re: Validation just for the changed elements? [message #820720 is a reply to message #820676] Wed, 14 March 2012 13:37 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Heinz,

no there is no infrastructure for that. You may want to execute your
validation only on save (see param for @Check annotation).
Did you profile your check implementation. Maybe there is something
unexpected going on under the hood?

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

Am 14.03.12 13:27, schrieb Heinz Huber:
> Hi,
>
> I got some validations which cause much cpu usage at the runtime
> (calculating permutations for logical expressions). Thats why i am
> asking if there is a way to tell the validator "just execute this
> validation for the element after some change inside the element was done".
>
> At the moment the validator runs every time i change 1 sign anywhere in
> the document -> And then he checks all validations.
>
> My fear is, that if my file gets longer and longer and longer -> That
> there will be a real problem with the cpu load.
>
> So ... is there a way to change the way of validation?
> Hope there is one! :>
>
> Thanks in advance!
>
>
Re: Validation just for the changed elements? [message #820756 is a reply to message #820720] Wed, 14 March 2012 14:31 Go to previous message
Heinz Huber is currently offline Heinz HuberFriend
Messages: 45
Registered: February 2012
Member
Hi Sebastian,

first of all thank you for your answer.

The function i wrote is okay. I checked it very often now.
And with a normal amount of using this validation everything is very fine.
I am just worried about the case when there are about 200 things which will be validated in this way.
So i thought of just let the validation happen when something is changed. But if Xtext couldn't do this at the moment, i have to stay worried until this feature is implemented Smile

The solution with the validation before saving is not the way i wanted it.
I'll give it a try, but i don't think that this is perfect for my use case.

Thanks again for the very quick help!! Smile
Previous Topic:Comparison!!!
Next Topic:Complex Cross Reference
Goto Forum:
  


Current Time: Fri Apr 26 07:22:12 GMT 2024

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

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

Back to the top