Page MenuHomePhabricator

D19777.diff
No OneTemporary

D19777.diff

diff --git a/src/applications/macro/engine/PhabricatorMemeEngine.php b/src/applications/macro/engine/PhabricatorMemeEngine.php
--- a/src/applications/macro/engine/PhabricatorMemeEngine.php
+++ b/src/applications/macro/engine/PhabricatorMemeEngine.php
@@ -174,6 +174,15 @@
private function newAssetData(PhabricatorFile $template) {
$template_data = $template->loadFileData();
+ // When we aren't adding text, just return the data unmodified. This saves
+ // us from doing expensive stitching when we aren't actually making any
+ // changes to the image.
+ $above_text = $this->getAboveText();
+ $below_text = $this->getBelowText();
+ if (!strlen(trim($above_text)) && !strlen(trim($below_text))) {
+ return $template_data;
+ }
+
$result = $this->newImagemagickAsset($template, $template_data);
if ($result) {
return $result;

File Metadata

Mime Type
text/plain
Expires
Sat, May 11, 2:58 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6276405
Default Alt Text
D19777.diff (878 B)

Event Timeline