Community
Participate
Working Groups
Cloned from: 366803: Improve performance of CDOTransactionImpl.getID(InternalCDOObject, boolean) https://bugs.eclipse.org/bugs/show_bug.cgi?id=366803 Recent profiling sessions in one of our applications reveal a big performance bottleneck in org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.getID(InternalCDOObject, boolean), and more specifically in the following code snippet: if (getDetachedObjects().containsValue(object)) { CDORevisionKey revKey = cleanRevisions.get(object); if (revKey != null) { id = revKey.getID(); } } This bottleneck appears with big commits with lots of changes, where getDetachedObjects() returns a big collection. Any enhacement should be backported to 4.0 too, as long as its technically possible.
Created attachment 208492 [details] patch v1 using git diff
ping!
ping :(
Sorry for the delay!!!
maybe in addition to your patch additional performance improvement is possible. implement a method isDetachtedObject(). At the moment the detachedObjects Map is constructed every time when a call to to getDetachedObjects() is done via lastSavePoint.getAllDetachedObjects(). the isDetachedObject() could return a boolean without the need for first building the Map.
Committed to Master, c9ef64734d58570258cff0cc4a3fe24024512ae7
Ronald, could you please create a separate bugzilla for your performance enhancement proposal? Thanks!
Closing.