mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 06:42:42 +01:00
TransactionEditor: micro-optimize the "creation finder"
Summary: The foreach starting at old line 1305-1311 was designed to look for a specific transaction type. When we have found that, let's stop that loop, so, we save some CPU cycles. Test Plan: Note that getTransactionType() has not side-effects. Test some applications - like Pholio - that use the TransactionEditor: - Create a new Pholio and Save - Save it again without changes. - Save it again with changes. Everything still working normally. Reviewers: O1 Blessed Committers, aklapper Reviewed By: O1 Blessed Committers, aklapper Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25627
This commit is contained in:
parent
6514598f66
commit
b6f132f04f
1 changed files with 1 additions and 0 deletions
|
@ -1307,6 +1307,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
foreach ($xactions as $xaction) {
|
foreach ($xactions as $xaction) {
|
||||||
if ($xaction->getTransactionType() == $create_type) {
|
if ($xaction->getTransactionType() == $create_type) {
|
||||||
$mark_as_create = true;
|
$mark_as_create = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue