test code for performance evaluation - will restore later
authordadubrow
Tue, 09 Jun 2009 10:02:47 -0500
changeset 25 68aa5b0d78d4
parent 24 b00fe9004252
child 26 8717e2008e00
test code for performance evaluation - will restore later
cdt/cdt_5_0_x/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java
--- a/cdt/cdt_5_0_x/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java	Mon Jun 08 12:51:27 2009 -0500
+++ b/cdt/cdt_5_0_x/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryUtil.java	Tue Jun 09 10:02:47 2009 -0500
@@ -333,22 +333,24 @@
 	}
 
 	public static ICModelStatus validatePathEntry(ICProject cProject, IPathEntry[] entries) {
-
-		// Check duplication.
-		for (IPathEntry entry : entries) {
-			if (entry == null) {
-				continue;
-			}
-			for (IPathEntry otherEntry : entries) {
-				if (otherEntry == null) {
+		// TODO restore this!!! only for performance testing since this seems to be a major bottleneck!!		
+		if (false) { // remove
+			// Check duplication.
+			for (IPathEntry entry : entries) {
+				if (entry == null) {
 					continue;
 				}
-				if (entry != otherEntry && otherEntry.equals(entry)) {
-					StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
-					return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
+				for (IPathEntry otherEntry : entries) {
+					if (otherEntry == null) {
+						continue;
+					}
+					if (entry != otherEntry && otherEntry.equals(entry)) {
+						StringBuffer errMesg = new StringBuffer(CCorePlugin.getResourceString("CoreModel.PathEntry.DuplicateEntry")); //$NON-NLS-1$
+						return new CModelStatus(ICModelStatusConstants.INVALID_PATHENTRY, errMesg.toString());
+					}
 				}
 			}
-		}
+		} // remove
 
 		// check duplication of sources
 		List<IPathEntry> dups = checkForDuplication(Arrays.asList(entries), IPathEntry.CDT_SOURCE);