Bug 160926 - Unnecessary eResource() calls in CacheAdapter
Summary: Unnecessary eResource() calls in CacheAdapter
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 2.0.3   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2006-10-13 15:58 EDT by Christian Damus CLA
Modified: 2008-01-28 16:36 EST (History)
1 user (show)

See Also:


Attachments
A patch that addresses the unnecessary eResource() calls (1.66 KB, patch)
2006-10-13 15:59 EDT, Christian Damus CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2006-10-13 15:58:43 EDT
The CacheAdapter is calling eResource() unnecessarily in the following instances:

In notifyChanged(Notification), when the notifier is an EObject, the CacheAdapter always calls clear(Resource) for the notifier's eResource().  This is not necessary when the notification is a "touch", for example, a REMOVING_ADAPTER notification.

In unsetTarget(EObject), the CacheAdapter will also call clear(Resource) for the target's eResource().  This is unnecessary when the resource is in the process of unloading, because the object is already detached, and unloading the resource will clear the entire cache, anyway (not just the resource's portion of it).  This is also just a repeat of what notifyChanged() did already in response to REMOVING_ADAPTER (see above).

In profiling the unloading of a large UML model (160 MB on disk), addressing these two instances of the problem reduced the time required to unload the model from 38 seconds to 34, a savings of more than 10%.
Comment 1 Christian Damus CLA 2006-10-13 15:59:36 EDT
Created attachment 51975 [details]
A patch that addresses the unnecessary eResource() calls
Comment 2 Kenn Hussey CLA 2006-11-08 14:10:54 EST
The fix has been committed to CVS.
Comment 3 Kenn Hussey CLA 2006-11-16 22:57:07 EST
The fix is available in build M200611162216.
Comment 4 Nick Boldt CLA 2008-01-28 16:36:26 EST
Move to verified as per bug 206558.