Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Performance issues during element selection

Hi

Caches will certainly help, but only if they are accurate. If the UML model evolves caches may go stale and give confusing behaviour. OCL has this problem with a stale Pivot representation that has been partly alleviated by only creating the full M1 pivot when InstanceSpecification constraints are in use. Current work on auto-generation should ensure that the derived caches are defined by OCL expressions that are amenable to accurate automated incremental valuation. This could work for the EMF Facet caches too.

However this is also a symptom of a more general problem. It is unfriendly to do any non-trivial model operation on the main UI thread. Worker threads should always be used; primarily to avoid a total UI freeze but also to enable cancel.

    Regards

        Ed Willink

On 08/03/2016 10:23, RADERMACHER Ansgar 206501 wrote:
Dear all,

the element selection in the property view (e.g. choosing a type for an attribute or assigning a value to a stereotype attribute) has severe performance issues: the UI can be blocked for several minutes even for mid-sized models. See Bug 435352 - [Property view] Attribute selection takes way too long.

The main reason is that the element selection is based on EMF Facet and each registered facet slows down the process.
One problem is that each facet implements a getChildren/hasChildren operation that links model elements with notation elements. The implementation of these operations is iterating over all notation elements and thus quite inefficient, since notation elements reference model elements but not vice versa.
Thus, the element search that loops over all model elements, implies several inner loops over all notation elements thus implying a quadratic effort.
It gets worse, since elements can be found via different paths, e.g. directly via the working set or via (nested) package imports. Thus, elements in imported models are queried several times.

One option is the caching of references from model to notation elements, as proposed in the gerrit attached to the bug (a long time ago) . Eventually, we can also use the EMF inverse-referencing mechanism for the navigation.

Another option is to disable the lookup of notation elements temporary during an element lookup - since notation elements are never selectable during an element assignment.

Other ideas?

Best regards

Ansgar



_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev


Back to the top