1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +01:00

Speedup implicit fallthrough lint rule by 99.5 %

Summary: At least on my sample file.

Test Plan: Saw time 0.073 s instead of 12.606 s.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5086
This commit is contained in:
vrana 2013-02-22 13:49:16 -08:00
parent 4d28d91d98
commit aadaf9a795

View file

@ -534,9 +534,10 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
$tokens = $block->getTokens();
$last = end($tokens);
while ($last && $last = $last->getNextToken()) {
if (!$last->isSemantic()) {
$tokens[$last->getTokenID()] = $last;
if ($last->isSemantic()) {
break;
}
$tokens[$last->getTokenID()] = $last;
}
$blocks[$key] = array(