Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Cartaud2016-01-14 06:43:13 -0500
committerMathieu Cartaud2016-02-01 04:18:44 -0500
commit755f4bc6c59ebc762a6b92c53c6011243be344b4 (patch)
treefc8ddcfb5e2402e3df6586e09b950c4079b45671 /performance
parentae6fc1e8a3d7de7a5b1135476adcfda258c77627 (diff)
downloadorg.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.tar.gz
org.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.tar.xz
org.eclipse.emf.compare-755f4bc6c59ebc762a6b92c53c6011243be344b4.zip
Scalable conflict detector
New algorithm searches for conflicts only where it makes sense, which is basically in the same match generally, except for ReferenceChanges, for which an index on values is used. Consequently, the algorithm shrinks from O(n²) to O(n) or maybe O(n log(n)). Change-Id: I021d90dd7a0429116edc071759ee65f2fa06b56c Signed-off-by: Laurent Delaigue <laurent.delaigue@obeo.fr> Signed-off-by: Mathieu Cartaud <mathieu.cartaud@obeo.fr>
Diffstat (limited to 'performance')
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/Data.java6
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/Data.java b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/Data.java
index 16fb8c343..c01a38d91 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/Data.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/Data.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Obeo.
+ * Copyright (c) 2012, 2016 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.conflict.DefaultConflictDetector;
+import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.conflict.IConflictDetector;
import org.eclipse.emf.compare.diagram.internal.CompareDiagramPostProcessor;
import org.eclipse.emf.compare.diff.DefaultDiffEngine;
@@ -139,7 +139,7 @@ public abstract class Data {
}
public void conflict() {
- final IConflictDetector conflictDetector = new DefaultConflictDetector();
+ final IConflictDetector conflictDetector = new MatchBasedConflictDetector();
conflictDetector.detect(comparison, new BasicMonitor());
}
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
index 55d64a710..81ea64593 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/data/models/DataGit.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015 Obeo.
+ * Copyright (c) 2015, 2016 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -38,7 +38,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.compare.Comparison;
import org.eclipse.emf.compare.EMFCompare;
-import org.eclipse.emf.compare.conflict.DefaultConflictDetector;
+import org.eclipse.emf.compare.conflict.MatchBasedConflictDetector;
import org.eclipse.emf.compare.conflict.IConflictDetector;
import org.eclipse.emf.compare.diagram.internal.CompareDiagramPostProcessor;
import org.eclipse.emf.compare.diff.DefaultDiffEngine;
@@ -209,7 +209,7 @@ public class DataGit {
}
public void conflict() {
- final IConflictDetector conflictDetector = new DefaultConflictDetector();
+ final IConflictDetector conflictDetector = new MatchBasedConflictDetector();
conflictDetector.detect(comparison, new BasicMonitor());
}

Back to the top