Page MenuHomePhabricator

When `{meme ...}` embed has no text, just use the raw file data unmodified
ClosedPublic

Authored by epriestley on Nov 6 2018, 5:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 12, 5:19 PM
Unknown Object (File)
Sun, Feb 9, 6:38 AM
Unknown Object (File)
Sun, Feb 9, 6:38 AM
Unknown Object (File)
Sun, Feb 9, 6:38 AM
Unknown Object (File)
Sun, Jan 26, 8:46 PM
Unknown Object (File)
Sat, Jan 25, 2:33 AM
Unknown Object (File)
Sat, Jan 25, 2:32 AM
Unknown Object (File)
Sat, Jan 25, 2:32 AM
Subscribers
None

Details

Summary

Ref T13216. See PHI948. When you use the remarkup hint button to embed a meme with no text, you get {meme src=X}.

If the source is a GIF, we currently split the source apart into frame-by-frame images, process them, and stitch them back together. The end result is the same image we started with, but this process can be slow/expensive, and may timeout for sufficiently large GIFs.

Instead: when there's no text, just return the original image data.

Test Plan
  • Used {meme src=X} with no text, got an image faster.
  • Used {meme src=X, above=...} to add text, got an attempt to add text (which didn't get very far locally since I don't have GD configured).

Diff Detail

Repository
rP Phabricator
Branch
meme1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 21087
Build 28657: Run Core Tests
Build 28656: arc lint + arc unit