summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-11-09 02:09:18 (EST)
committerEike Stepper2007-11-09 02:09:18 (EST)
commit408ac311dd6eed139fd4a7da6974ebdc03d1d8ec (patch)
treedd7f2d3c6c953f2a22e3b8d558b8cf574674133e
parent68cbe24e840b1bf5a4480e3e58523306428c9bfe (diff)
downloadcdo-408ac311dd6eed139fd4a7da6974ebdc03d1d8ec.zip
cdo-408ac311dd6eed139fd4a7da6974ebdc03d1d8ec.tar.gz
cdo-408ac311dd6eed139fd4a7da6974ebdc03d1d8ec.tar.bz2
[209307] Optimize reload() to only verify current revisions
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209307
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index 2a70a55..bdb9ae2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -158,9 +158,19 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
{
Map<CDOID, InternalCDOObject> ids = new HashMap<CDOID, InternalCDOObject>();
List<CDORevisionImpl> revisions = new ArrayList<CDORevisionImpl>();
+ List<CDORevisionImpl> revised = new ArrayList<CDORevisionImpl>();
for (InternalCDOObject object : objects)
{
- revisions.add((CDORevisionImpl)object.cdoRevision());
+ CDORevisionImpl revision = (CDORevisionImpl)object.cdoRevision();
+ if (revision.isCurrent())
+ {
+ revisions.add(revision);
+ }
+ else
+ {
+ revised.add(revision);
+ }
+
ids.put(object.cdoID(), object);
}
@@ -176,6 +186,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
throw new TransportException(ex);
}
+ revisions.addAll(revised);
for (CDORevisionImpl revision : revisions)
{
InternalCDOObject object = ids.get(revision.getID());