uploads: memoize dimensions of flash files

flash files can be quite big (the biggest on danbooru.donmai.us being
68.6MB atm). Reading it and applying complex transformations twice seems
unnecessary.
This commit is contained in:
lllusion3469
2020-05-25 18:58:48 +02:00
parent b2814c1125
commit 5c2ecee60f

View File

@@ -54,4 +54,5 @@ class MediaFile::Flash < MediaFile
[width, height]
end
memoize :dimensions
end