[ka-Map-users] Some thoughts/questions about tile.php

Daniel Morissette dmorissette at mapgears.com
Fri Jul 14 07:56:54 EDT 2006


Stephen Woodbridge wrote:
> 
> It seems like it would be faster to avoid this locking, ie: if the file 
> exists just serve it. If image creation were written to a tmp file name 
> and renamed to the actual tile name when the write was done and the file 
> closed, this would be atomic and should avoid the problem that the code 
> above is dealing with.
> 

I like the idea, but what you propose would leave a possibility of 
multiple hits generating the same metatile in parallel since the 
metatile folder would not exist until the metatile has been completely 
created.

I think what may work would be:

10 If the tile exists then serve it
20 If the tile doesn't exist then use the current locking mechanism to 
create the metatile and split in tiles, with the difference that the 
tiles are created using temp filenames (or in a sub-directory) and moved 
at the end of the creation process to prevent partial tiles from being 
served
30 GOTO 10


> 
> Second issue is that directory structure is pretty flat as Paul has 
> mentioned in the past. I was thinking that a very trivial change would 
> be to split the directories tnnnnn-lnnnnnn into tnnnnn/lnnnnnn which 
> would significantly reduce the number of entries in any given directory.
> 

I like this idea too.

Daniel
-- 
Daniel Morissette
http://www.mapgears.com/


More information about the ka-Map-users mailing list