streets-gl icon indicating copy to clipboard operation
streets-gl copied to clipboard

Excessive image loading times

Open Pikamander2 opened this issue 2 years ago • 2 comments

When loading the website, I notice that most of the initial loading process involves loading a bunch of images, most of which appear to be lossless PNGs. This loading process could be drastically shortened by switching to lossless WebP images and/or accepting a small amount of quality loss for the images.

image

For example:

  • sand_diffuse.png is 1575 KB.
  • Resaving the original as a lossless WebP with GIMP brings it down to 336 KB.
  • Resaving the original as a 90% quality WebP with GIMP brings it down to 79 KB with virtually no visual difference.
  • Resaving the original as a 60% quality WebP with GIMP brings it down to 27 KB with a minimal visual difference.
  • Resaving the original as a 30% quality WebP with GIMP brings it down to 13 KB with a moderate visual difference.

Alternatively, if there's a reason it needs to be PNG, running the original through TinyPNG brings it down to 213 KB with virtually no visual difference.

image

IMO, 60% WebP seems like it would be the best match here. I'm not sure if Github compresses the uploaded copies at all, but here's an example of the original versus the 60% WebP. The latter is resaved as a PNG here to prevent Github from recompressing it.

original_sand_diffuse.png (1575 KB) original_sand_diffuse

gimp_60q_sand_diffuse.webp (27 KB) gimp_60q_sand_diffuse_webp

Here are the six files: sand_diffuse_comparison.zip

Pikamander2 avatar May 08 '23 08:05 Pikamander2

To sad this is esp. true on poor internet connectivity like on mobile hotspot. Yes a cornercase, but maybe more important if you consider VR and / or mobile devices?

Matthias84 avatar May 08 '23 17:05 Matthias84

From #37 answer on verification, the files seems to be processing, not being transferred.

Kovoschiz avatar May 08 '23 19:05 Kovoschiz