Page MenuHomePhabricator

Investigate how well cached 60px and 120px thumbnails are
Closed, ResolvedPublic

Description

And also while we're at it, if there is a size "nearby" that has much better hit ratio and/or swift presence (150px maybe?).

Event Timeline

Found this breakdown of thumbnail sizes in swiftthat had been done some time ago: https://phabricator.wikimedia.org/T65440#1448815

120 is an excellent choice, it's the most common thumbnail size. 60px is quite low in the ranking but still in the top 50. 48px (3rd most used) would be a much better option, though, in that "area". There are roughly ten times more 48px thumbnails than 60px, which means a 48px request is 10 times more likely to be a hit than a 60px. If you need slightly bigger, 75px is your next best choice.

Did you mean to tag yourself? :)

haha i gotta remember to just tap the subscribe button :)

There isn't more to investigate, imho. I'd recommend you use either 48px or 75px instead of 60px to increase performance.

Found this breakdown of thumbnail sizes in swiftthat had been done some time ago: https://phabricator.wikimedia.org/T65440#1448815

I've ran the numbers again today and the resulting json is P4577, it'll need a bit of json-love but it contains a breakdown by size of bytes and number of thumbnails

I've ran the numbers again today and the resulting json is P4577, it'll need a bit of json-love but it contains a breakdown by size of bytes and number of thumbnails

Updated P4577. Sorted using jq :-)

Top 10:

BytesPerSize
"2880": 11235128303234,
"1920": 5447599279713,
"1280": 5118964716716,
"1024": 4100381810363,
"2560": 3901237941485,
"800": 3687993251192,
"640": 2464623579198,
"1200": 2202060461083,
"1600": 1265417767891,
"320": 800856360021,
CountPerSize
"180": 35025828,
"120": 34662399,
"320": 27906299,
"800": 26438144,
"640": 26389242,
"240": 23411309,
"1024": 20756041,
"1280": 18169359,
"48": 15720077,
"300": 14666507,
"150": 13955179,
$ cat data.json | jq -r '.BytesPerSize | to_entries | sort_by(.value) | reverse | from_entries | { BytesPerSize: . }' > data-sorted-bytes.json
$ cat data.json | jq -r '.CountPerSize | to_entries | sort_by(.value) | reverse | from_entries | { CountPerSize: . }' > data-sorted-count.json
$ jq -s add data-sorted-* > data-sorted.json
$ wc -l data.json data-sorted.json 
  30638 data.json
  30638 data-sorted.json

When you talk about size you mean width, right?

@bearND correct, the size as it appears in the url before px