[Tilesathome] DeleteRealTile issue

spaetz osm at sspaeth.de
Mon Jul 30 16:02:06 BST 2007


I am currently looking into why we perform so many mysql DELETE statements. From glancing at mytop, I can see many DELETEs from tiles_meta. The only place that it called is from Upload/Run/index.php in the function DeleteRealTile which is used to delete the tile file and its meta data entry. DeleteRealTile is described as: (Delete a tile and its metadata (usually when a blank tile is uploaded in its place).

That function in turn is only called from function SaveBlankTiles($BlankTileList, $UserID){
which is described as "Save uploaded blank tiles in the database". SaveBlankTiles looks like this:

...
 # Make a blank tile
 if( $Type >= 0 )
  { ...} 
 else
  { # Delete a blank tile
  ...
  }
 DeleteRealTile($X,$Y,$Z,$Layer);
...

Now my questions:
 - Does DeleteReealTile really have to be called in both cases? I think it would suffice it it were called in the first "Make a blank tile" part, as we need to remove traces of existing tiles. However in the case of $Type==0 which is "Delete a blank Tile" we will upload proper meta data and a tile file anyway, so there is no need to remove those. Am I right? This would save us some unneccessary MySQL and file operations and it would actually make more sense.
 - Am I right that a Type=0 would mean there used to be a blank file, but now we move a proper tile to that location? I haven't familiarized myself with the Blank Tile code yet.

spaetz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20070730/fd446053/attachment.pgp>


More information about the Tilesathome mailing list