[OSM-talk] T at H error

spaetz osm at sspaeth.de
Tue Sep 25 09:13:49 BST 2007


On Mon, Sep 24, 2007 at 10:50:45PM +0100, 80n wrote:
> > Of course, this might not be true.  Is it possible to, rather than
> > finding the length of the entire way and checking if the name will fit
> > within that, instead find the largest desired length of the name, and
> > recurse until either the way is longer than that (meaning it fits) or
> > the complete way is found (meaning it will not fit and the text must be
> > shrunk or truncated or whatever).
> 
> Yes, that is absolutely a much better way to deal with this.  I should think
> before I write.

Xaa has implemented that solution in a patch that makes osmarender.xsl smaller by 2kb as a side effect. It will hopefully prevent the infinite recursion errors.

I have tested performance on some random osm file:
Orig: 10.423 8.14 (avg Real and user time from 5 runs)
Patch: 9.888 8.073

I then rendered the Zurich area at z12 (1.8MB osm file)

Orig 46.650 37.989 (avg Real and user time from 3 runs)
Patch 47.062 (+0.8%) 38.184 (+0.5%)

So performance seems neither to increase nor decrease significantly. However that would of course depend heavily on the type of data osmarender is run on.

If 80n tests this patch (I don't know whether Xaa has send it to him already) and finds that it might help the recursion aborts, I would be happy if we could incorporate it.

Thanks to Xaa in any case for his efforts,
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/talk/attachments/20070925/d2f61889/attachment.pgp>


More information about the talk mailing list