Community
Participate
Working Groups
The implementation of the Element.validateNotOwnSelf constraint has two performance/scalability issues: - calling Element.allOwnedElements() has O(n) complexity. Checking whether any owner (recursively) is self would have O(log(n)) complexity - calling Element.allOwnedElements() causes all containment proxies to be resolved, loading additional resources unnecessarily Both of these problems could be resolved by checking the container chain of the element.
Created attachment 49531 [details] Patch that fixes the problem for me Attached a patch that fixes the problem for me. With this change, I no longer get unwanted containment proxy resolution and it seems to perform faster. I have not tested, though, whether the constraint with this patch still catches ownership cycles.
The fix has been committed to CVS.
Fixed in M200609071509.
Move to verified as per bug 206558.