[Tilesathome] maplint using up all memory
Robert Fitzsimons
robfitz at 273k.net
Thu Jun 26 16:58:15 BST 2008
Ok, I think I've tracked down the cause of the problem to a recent
change (http://trac.openstreetmap.org/changeset/7985) in
osmarender6/osmarender.xsl, which adds support for showing
RelationRoutes.
This change seems to have resulted in two nested loops, which each
iterate over the same set of nodes, instead of doing just one iteration.
The patch below just draws one circle for a node and seems to work
correctly, though I'm no xsl/osmarender expert.
Robert
Index: osmarender.xsl
===================================================================
--- osmarender.xsl (revision 8483)
+++ osmarender.xsl (working copy)
@@ -950,13 +950,10 @@
<!-- Draw circle for a node -->
<xsl:template match="node" mode="circle">
<xsl:param name="instruction"/>
- <xsl:param name="elements"/>
- <xsl:for-each select="$elements[name()='node']">
- <xsl:call-template name="drawCircle">
- <xsl:with-param name="instruction" select="$instruction"/>
- </xsl:call-template>
- </xsl:for-each>
+ <xsl:call-template name="drawCircle">
+ <xsl:with-param name="instruction" select="$instruction"/>
+ </xsl:call-template>
</xsl:template>
On Wed, Jun 25, 2008 at 05:35:02PM +0100, Robert Fitzsimons wrote:
> I just came across a tile with a number of errors (nodes on the same
> spot) which caused inkscape to use up all the memory (4 GB ram) and
> started to swap really badly, nearly requiring a server reboot as I was
> struggling to login to kill inkscape.
>
> The tile itself (2367, 1287) is fairly simple with the downloaded osm
> file only containing 657 nodes and 26 ways, with 286 erroneous nodes
> that are duplicates of other nodes. The maplint processing detects and
> flags these errors, but seems to go a bit crazy and generates a svg with
> each error marked 1144 (4 * 286) times.
>
> I'll contact the user who added the duplicate data but I think we'll
> need to fix up the maplint processing.
>
> Robert
>
More information about the Tilesathome
mailing list