Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13980431
D7581.id17118.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7581.id17118.diff
View Options
Index: src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
===================================================================
--- src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
+++ src/applications/differential/field/specification/DifferentialUnitFieldSpecification.php
@@ -70,8 +70,23 @@
$udata[$key]['sort'] = idx($sort_map, idx($test, 'result'));
}
$udata = isort($udata, 'sort');
-
- foreach ($udata as $test) {
+ $engine = new PhabricatorMarkupEngine();
+ $engine->setViewer($this->getUser());
+ $markup_objects = array();
+ foreach ($udata as $key => $test) {
+ $userdata = idx($test, 'userdata');
+ if ($userdata) {
+ if ($userdata !== false) {
+ $userdata = str_replace("\000", '', $userdata);
+ }
+ $markup_object = id(new PhabricatorMarkupOneOff())
+ ->setContent($userdata);
+ $engine->addObject($markup_object, 'differential.diff');
+ $markup_objects[$key] = $markup_object;
+ }
+ }
+ $engine->process();
+ foreach ($udata as $key => $test) {
$result = idx($test, 'result');
$default_hide = false;
@@ -110,17 +125,10 @@
'show' => $show,
);
- $userdata = idx($test, 'userdata');
- if ($userdata) {
- if ($userdata !== false) {
- $userdata = str_replace("\000", '', $userdata);
- }
- $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
- $engine->setConfig('viewer', $this->getUser());
- $userdata = $engine->markupText($userdata);
+ if (isset($markup_objects[$key])) {
$rows[] = array(
'style' => 'details',
- 'value' => $userdata,
+ 'value' => $engine->getOutput($markup_objects[$key], "differential.diff"),
'show' => false,
);
if (empty($hidden['details'])) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Oct 20 2024, 10:37 AM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736143
Default Alt Text
D7581.id17118.diff (1 KB)
Attached To
Mode
D7581: Speed up loading of diffs with a lot of unit test failures
Attached
Detach File
Event Timeline
Log In to Comment