[Tilesathome] Potential t at h optimization: Re-use the optimized .png image

Ævar Arnfjörð Bjarmason avarab at gmail.com
Thu Dec 18 17:00:49 GMT 2008


When I render areas that aren't cityscape I note that most of the time
to render each tile is being spent on the post-optimization and
compression of the generated png file. If I look at the generated .png
file I find that up to 95% of them share the same md5sum.

If the PNG optimization and compression routines in Tileset.pm kept a
record of the previous byte size of generated tiles (as reported by
stat()) and if they matched ran md5sum() on them and if that matched
simply copied over the old previously optimized tile instead of doing
the work again a speedup could be gained. Large amounts of the tiles
on the planet probably have some duplicate parts.

I'm not going to implement this but I thought I'd suggest it anyway if
someone else is interested.




More information about the Tilesathome mailing list