Hey Riot: you could compress your media files a lot better

Billco·11/25/2015, 11:20:13 AM·9 votes·578 views

For curiosity's sake, I decided to try optimizing all the images in the "RADS\projects\lol_air_client\releases\0.0.1.171\deploy" directory, using the open-source Mac tool "ImageOptim". It is based on command line tools like 'jpegoptim', 'optipng' and 'pngcrush', so you could integrate these into your build scripts if desired. They repack an image without affecting quality - it is a visually lossless operation. Some of the savings come from stripping EXIF/IPTC metadata, and some is caused by poorly encoded files - Photoshop is pretty awful in this regard.

Well long story short, I was able to save 340 mb (out of 982 mb of images). Almost 35% just from lossless compression!

You're also saving your MP3 files as 256-320kbps CBR, which is far from ideal. CBR yields worse quality than VBR at similar bitrates. Further, these voiceovers and catchphrases still sound flawless with "lame -V3 -q0" (~170kbps VBR). This shaves another 200mb, with no noticeable drop in quality, even on a five-figure studio system like mine.

All together, this reduces the size of the "lol_air_client" folder by 30%. Faster loading, faster patching, less bandwidth, etc. I know you're working on a new front-end client, but if you continue to use regular media files (and not WWise archives), these tricks will still be useful.

2 Comments

Billco11/26/2015, 12:41:11 AM2 votes

Another 370mb goes to Flash animations (for the login screens), which I assume will be replaced or discarded with the new client. The entire footprint of the client could be cut to 1/3rd of its current size or less, if they're willing to accept some minimally lossy compression on the images (e.g. 'pngquant').

I do this sort of thing all the time with iPhone apps and web sites. I am actually quite surprised that Riot isn't using these very common tricks. With the millions of players, saving a PETAbyte here and there would make a noticeable dent in the company's bandwidth and CDN bills. Heck, I get cheap transit and even to me that's a few thousand bucks in server bills. Multiply that by each patch day, and Riot could easily be looking at six-figure savings annually - even after I collect my consulting per-diems ;)

TurquoiseYoshi11/25/2015, 12:53:05 PM1 votes

Maybe they're working on that for the new client. If not, Riot should seriously look at this.