Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15476753
D7583.id17116.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
980 B
Referenced Files
None
Subscribers
None
D7583.id17116.diff
View Options
Index: src/infrastructure/markup/PhabricatorMarkupEngine.php
===================================================================
--- src/infrastructure/markup/PhabricatorMarkupEngine.php
+++ src/infrastructure/markup/PhabricatorMarkupEngine.php
@@ -202,13 +202,16 @@
PhabricatorMarkupInterface $object,
$field) {
- $custom = array_merge(
- self::loadCustomInlineRules(),
- self::loadCustomBlockRules());
-
- $custom = mpull($custom, 'getRuleVersion', null);
- ksort($custom);
- $custom = PhabricatorHash::digestForIndex(serialize($custom));
+ static $custom;
+ if ($custom === null) {
+ $custom = array_merge(
+ self::loadCustomInlineRules(),
+ self::loadCustomBlockRules());
+
+ $custom = mpull($custom, 'getRuleVersion', null);
+ ksort($custom);
+ $custom = PhabricatorHash::digestForIndex(serialize($custom));
+ }
return $object->getMarkupFieldKey($field).'@'.$this->version.'@'.$custom;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 8, 9:06 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7736197
Default Alt Text
D7583.id17116.diff (980 B)
Attached To
Mode
D7583: Cache the computation of the custom block component of the markup key
Attached
Detach File
Event Timeline
Log In to Comment