[Tilecache] performance ideas

Jacob Marble jacobmarble at gmail.com
Wed Dec 30 20:09:30 EST 2009


I have a few thoughts regarding performance.  I'm interested in any
input that experienced users/developers can share.  My environment is
Ubuntu 9.10

1) I notice that when TC renders a metatile, it immediately crops and
saves all subtiles within the metatile.  Has anyone considered the
idea of caching the metatile, and just cropping the requested subtile?
 I think this could improve user experience when the metasize is
something very large (I'm shooting for 20x100 or so).

2) I notice that when a metatile is rendered in mapserver (I'm using
the MS layer type), the function getBytes can take a long time when
the tilesize is large.  Is there a faster way to get the image from
mapserver?  I have tried changing the mapserver source code from
Z_BEST_COMPRESSION to Z_NO_COMPRESSION, but there is no noticeable
difference.  My imagination tells me that the "bytes" are being
organized into PNG format; is there a way to get raw bytes from MS?

3) The (sub)tiles returned from TC are larger in terms of bytes than I
think they ought to be.  For example, an empty tile is over 3000 bytes
from TC, while MS's empty tiles are well under 1000 bytes.  It looks
like PIL uses zlib, which should be sufficient.

4) Has anyone considered soft-linking empty tiles to all point to one
tile?  This would save space on the cache.  In Windows, an empty file
(0 bytes) could mean "transparent tile".  Another alternative that
would work for any Cache backend would be to manually create the
smallest possible 256x256 tile, and use that in place of the larger
PIL empty tiles.

Anyhow, these are some things that I will continue to investigate on
my own, but please share your experience with these topics if you can.

Thanks,

Jacob



More information about the Tilecache mailing list