[Tilecache] performance ideas

Jacob Marble jacobmarble at gmail.com
Mon Jan 4 10:37:05 EST 2010


On Wed, Dec 30, 2009 at 6:09 PM, Jacob Marble <jacobmarble at gmail.com> wrote:
> 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.

5) Not a performance idea, but something nice.  My .cfg file has lots
of redundant values.  How about adding a [default] section to the .cfg
parser where default values can be set.  For example, epsg:4326 is not
what I need, so every [layer] has srs=EPSG:900913.  Instead, just put
srs= in the [default] section, and now every layer will use that as
it's default.  I suspect there could be a way to do this that I just
haven't found yet.

I've not yet received any feedback, am I wasting my time?

Jacob



More information about the Tilecache mailing list