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:
@@ -54,4 +54,5 @@ class MediaFile::Flash < MediaFile
|
||||
|
||||
[width, height]
|
||||
end
|
||||
memoize :dimensions
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user