Bug 543190 - [Validation Service] Reduce scope of re-validation for child context
Summary: [Validation Service] Reduce scope of re-validation for child context
Status: CLOSED FIXED
Alias: None
Product: ECP
Classification: Modeling
Component: Validation (show other bugs)
Version: 1.19.0   Edit
Hardware: PC Mac OS X
: P2 normal (vote)
Target Milestone: 1.20.0   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2019-01-05 16:46 EST by Christian Damus CLA
Modified: 2019-01-31 08:18 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2019-01-05 16:46:01 EST
When a child view-model context is created, as for selection of some object in a master-detail table form, the default ValidationService implementation re-validates everything that is presented in the parent context (the master table).  For large datasets with many and/or complex validation rules, this can introduce significant delays in the UI responsiveness on changing selection in tables.

It seems that it should only be necessary to validate the portion of the data-set that becomes visible in the form as a result of the creation of the child context.  And because the validation of those objects may reasonably be expected to affect containers, perhaps also the domain-model of the parent view-model contexts.
Comment 1 Eclipse Genie CLA 2019-01-05 18:08:45 EST
New Gerrit change created: https://git.eclipse.org/r/134683
Comment 3 Christian Damus CLA 2019-01-17 16:40:39 EST
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/134683 was merged to [develop].
Comment 4 Jonas Helming CLA 2019-01-30 08:37:30 EST
Should we add the "test" tag here and provide testing information?
Comment 5 Christian Damus CLA 2019-01-31 08:18:44 EST
(In reply to Jonas Helming from comment #4)
> Should we add the "test" tag here and provide testing information?

Indeed.  This could result in regression of behaviour in models that depend on being fully re-validated in order to present problems on elements as they are revealed.  For example, in the case of a higher-level (or even root-level) object checking the consistency of objects within its subtree.  Such is the case, for example, with the common class of scoped uniqueness constraints.

So, for example, applications that use table controls in their form views should check that

- the first column (validation status) shows problems on any elements that should fail validation
- in the case of a master-detail view, that selection of an object shows relevant problems per feature in its detail controls
- that upon editing an object in the table (or in details in case of master-detail view), validation status is updated to clear fixed problems or to present new problems