performance boost in finding matchign spec lines

This commit is contained in:
John Bintz 2011-11-29 15:11:40 -05:00
parent 3c993001de
commit af14f69a07
2 changed files with 3 additions and 0 deletions

View File

@ -43,4 +43,6 @@ class window.HeadlessReporterResult
if index > bestChoice.accuracy if index > bestChoice.accuracy
bestChoice = { accuracy: index, file: file, lineNumber: lineNumber } bestChoice = { accuracy: index, file: file, lineNumber: lineNumber }
break if index == splitName.length
bestChoice bestChoice

View File

@ -70,6 +70,7 @@
lineNumber: lineNumber lineNumber: lineNumber
}; };
} }
if (index === splitName.length) break;
} }
return bestChoice; return bestChoice;
}; };