| Summary: | CDOTransactionImpl.formerRevisionKeys is superfluous | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Caspar D. <caspar_d> | ||||||||
| Component: | cdo.core | Assignee: | Caspar D. <caspar_d> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Eike Stepper <stepper> | ||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | saulius.tvarijonas | ||||||||
| Version: | 4.0 | Flags: | stepper:
review+
|
||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Caspar D.
Created attachment 190842 [details]
Patch v1
All tests pass, but this needs a closer look. The convenience of
formerRevisionKeys was that the detached InternalCDOObject was the
key; and so this map was a fast way of checking whether an object
had been detached.
Without the map, so far the only way that I can think of, of checking
this, is getDetachedObjects().containsValue(obj). That works, but
it's not efficient.
Created attachment 190843 [details]
Patch v2
The performance of the lookup is only an issue in CDOTransactionImpl.getID(InternalCDOObject,boolean). I'm not sure what to do about it without re-introducing an indexable collection of detached objects. Given, the changes in the else branch of CDOTransactionImpl.cleanUp(CDOCommitContext), I wonder if this bugzilla is "just" an enhancement... Created attachment 191193 [details]
Patch v3
Committed revision 7535: - trunk/plugins/org.eclipse.emf.cdo - trunk/plugins/org.eclipse.emf.cdo.tests Resolving for Caspar... Available in R20110608-1407 |