Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 434936

Summary: Factorize eResource() calls when possible
Product: [Modeling] Sirius Reporter: Alex Lagarde <alex.lagarde>
Component: CoreAssignee: Esteban DUGUEPEROUX <esteban.dugueperoux>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: esteban.dugueperoux, pierre-charles.david
Version: 1.0.0Keywords: triaged
Target Milestone: 2.0.0   
Hardware: All   
OS: All   
Whiteboard:

Description Alex Lagarde CLA 2014-05-15 05:24:31 EDT
A call to org.eclipse.emf.ecore.EObject.eResource() can be time consuming.

So when possible, we should keep result to eResource() calls in variables and reuse it instead of calling several times eResource()
Comment 1 Alex Lagarde CLA 2014-05-15 05:28:31 EDT
Proposed fix pushed on gerrit https://git.eclipse.org/r/#/c/26574/
Comment 2 Esteban DUGUEPEROUX CLA 2014-07-11 03:38:27 EDT
Commited as b6b1c489ab4c34dac0b12b4fba3eb26a9397222
Comment 3 Pierre-Charles David CLA 2014-09-23 08:40:26 EDT
See https://git.eclipse.org/r/33774 for a case that was missed.
Comment 4 Pierre-Charles David CLA 2014-09-24 09:03:39 EDT
Fixed by af6abf21adb9ac8237ca809341ce70f643f3a615.
Comment 5 Pierre-Charles David CLA 2014-10-27 06:52:49 EDT
Available in Sirius 2.0.0.