[Tilesathome] Proposal: Keeping tileset as one file

Alan Millar am12 at bolis.com
Thu Jun 5 20:13:06 BST 2008


Jiri Klement writes:

> What do you think about keeping the whole tileset (for z12) in one file?

Interesting idea.

> Uploading will be much easier than now, it will just save file
> uploaded by client to correct place, no zip extraction will be
> necessary.

Hmm; I don't think it is really any easier or different.  You need custom
code to write the tile into the proper position in the upload file in the
client, and the reverse to extract it on the server.  How is that any
easier than a zip file?  I haven't heard of any of the software having any
trouble with zip files.  Either way, on the server you are unpacking
several files from one file; you aren't getting around that.

> Performance - uploading will get definitely faster.

That is sort of true, for the immediate results on one z12 tile.  Right
now, if you upload each layer separately, like the current default
behavior, then you see lots of waiting in between steps in the tile
processing.

However, if you want it to upload all layers for one z12 tile in a single
upload, you can already do that using zip.  If you use the existing
tilegen process and save the tiles until the end, and combine them all in
a single zip file, then you have the exact same speedup as you are
proposing.  With the advantage that none of the file handling on the
server has to change at all.

Try it with  ./tilesGen.pl --LayerUpload=0 xy ....
and then you can zip them all up at the end.  Use   zip -j

(If you are concerned about the negligible performance impact of the
compression handling in the zip/unzip, the zip can be used as just a
container without compression.  See "zip -0" for example.)

The bottome line, though, is that the speedup in either case is an
illusion.  It gets it off your machine sooner into the upload queue, which
bogs down that much more.  You still have to wait that much longer to be
able to get the next tile uploaded into the queue.  None of this changes
how many tiles the server can process in 24 hours.  It just means that you
will see "No work for you; upload queue is full" more often than you do
now.

- Alan






More information about the Tilesathome mailing list