summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-04 09:07:37 (EDT)
committerEike Stepper2007-07-04 09:07:37 (EDT)
commitbacb27bffb728d30b9e4dbc319fb3ca10aaa8c2e (patch)
tree7ac69691358b552b79db25d22a73581cb93d9407
parent22412974fd3b221b4d779c6a0de446c23641591b (diff)
downloadcdo-bacb27bffb728d30b9e4dbc319fb3ca10aaa8c2e.zip
cdo-bacb27bffb728d30b9e4dbc319fb3ca10aaa8c2e.tar.gz
cdo-bacb27bffb728d30b9e4dbc319fb3ca10aaa8c2e.tar.bz2
task 1: Develop 0.8.0
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java21
2 files changed, 19 insertions, 7 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
index 70fe335..980927f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
@@ -105,7 +105,10 @@ public class CDOTransactionImpl
postCommit(newResources, result);
postCommit(newObjects, result);
postCommit(dirtyObjects, result);
- session.notifyInvalidation(result.getTimeStamp(), dirtyObjects.keySet(), view);
+ if (!dirtyObjects.isEmpty())
+ {
+ session.notifyInvalidation(result.getTimeStamp(), dirtyObjects.keySet(), view);
+ }
newResources.clear();
newObjects.clear();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 5d790f2..63abf8e 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -60,6 +60,10 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
private Map<CDOID, CDOObjectImpl> objects = new HashMap();
+ private CDOID lastLookupID;
+
+ private CDOObjectImpl lastLookupObject;
+
public CDOViewImpl(CDOSessionImpl session, boolean readOnly)
{
this.session = session;
@@ -168,7 +172,6 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
resourceObject.setResource(resource);
resourceObject.setState(CDOState.PROXY);
- resources.add(resource);
return resource;
}
catch (Exception ex)
@@ -184,14 +187,20 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
TRACER.format("Looking up object {0}", id);
}
- CDOObjectImpl object = objects.get(id);
- if (object == null)
+ if (id.equals(lastLookupID))
{
- object = createObject(id);
- registerObject(object);
+ return lastLookupObject;
}
- return object;
+ lastLookupID = id;
+ lastLookupObject = objects.get(id);
+ if (lastLookupObject == null)
+ {
+ lastLookupObject = createObject(id);
+ registerObject(lastLookupObject);
+ }
+
+ return lastLookupObject;
}
public void registerObject(CDOObjectImpl object)