# HG changeset patch # User dadubrow # Date 1244559767 18000 # Node ID 68aa5b0d78d431faf9b8ca2ebca44d59462bc3a8 # Parent b00fe900425287175148648bb0b7b626c47d2fdd test code for performance evaluation - will restore later diff -r b00fe9004252 -r 68aa5b0d78d4 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 dups = checkForDuplication(Arrays.asList(entries), IPathEntry.CDT_SOURCE);