Community
Participate
Working Groups
updateImportsAndExports in CrossReferenceAdapter uses getInverseReferences call to get inverse references and then discard some of these references if the resource of the referenced is equal to the referencing. With a special kind of getInverseReferences, which only goes for cross resource reference the calls to this method improve by upto 10%. Please see the attached CrossReferenceAdapter file, and check out methods named getInverseReferencersCrossResource getInverseReferencesCrossResource getInverseReferencesCrossResource and the calls to these methods.
Created attachment 44530 [details] Modified CrossReferenceAdapter file
Marking as a major issue for RC5. The change involves an API change, so this needs to go into 1.0.
Committed patch to R1_0_maintenance
Reopening because the attached file may break the cross reference adapter for feature maps. The commit of this file has been rolled back until these issues are investigated. Comments from Christian Damus, which were added to bug 146411 by mistake, are as follows: Hi, Anthony, The problem is, that some features marked as "derived" cannot be interpreted as being unchangeable (read-only) features that don't matter to the computation of imports and exports. A particular case of this occurs in feature maps, which are relatively common in EMF metamodels imported from XSD. In a feature map representing an XSD group, where the group members are EReferences, these EReferences are marked as "derived" because their values are actually derived from the feature map EAttribute (a list of EFeatureMapEntry). Despite being derived, they are entirely changeable. If the cross-referencer ignores these features, then it will not discover the cross-references that they contain, which may result in resource-level imports and exports being missed. However, it may be that the listening for proxy resolution brings these derived cross-references to the adapter's attention and gets imports and exports registered, later. I'm working on a JUnit test with a metamodel defining a feature map to see ...
Hi Christian, can you look at this defect further
Created attachment 46380 [details] Patch to reapply the original performance changes Attached a patch that reapplies the original performance changes, with the following additional updates: - replace the "!isDerived" check with an "isChangeable" check - factor out the criteria for references that are capable of defining imports and exports into a subclass-extensible method that is reused throughout the CrossReferenceAdapter for consistency
Adding Anthony to CC to review and apply the patch.
I have committed the updated patch to R1_0_maintenance
[GMF Restructure] Bug 319140 : product GMF and component Runtime EMF was the original product and component for this bug