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