From b586ee065a7531fb936a4bf44f85178df895a1e3 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 28 Mar 2018 15:21:33 -0700 Subject: [PATCH] Stop evaluating Herald rules when writing "someone mentioned this somewhere else." transactions Summary: Ref T13114. See PHI510. Firing Herald on mentioned objects tends to feel arbitrary and can substantially slow down edits which mention many objects. Test Plan: Mentioned tasks on other tasks; verified that the normal path is hit normally, the new Herald-free path is hit on the mentioned object, and both still work fine and show up in the timeline. Maniphest Tasks: T13114 Differential Revision: https://secure.phabricator.com/D19263 --- .../editor/PhabricatorApplicationTransactionEditor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php index 8184eafb50..e4a13de54e 100644 --- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php +++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php @@ -1120,6 +1120,11 @@ abstract class PhabricatorApplicationTransactionEditor // We are the Herald editor, so stop work here and return the updated // transactions. return $xactions; + } else if ($this->getIsInverseEdgeEditor()) { + // Do not run Herald if we're just recording that this object was + // mentioned elsewhere. This tends to create Herald side effects which + // feel arbitrary, and can really slow down edits which mention a large + // number of other objects. See T13114. } else if ($this->shouldApplyHeraldRules($object, $xactions)) { // We are not the Herald editor, so try to apply Herald rules. $herald_xactions = $this->applyHeraldRules($object, $xactions);