[OSM-dev] SVG / Canvas progress report

Tom Carden tom at tom-carden.co.uk
Sun Feb 19 15:59:59 GMT 2006


On 2/19/06, Nick Whitelegg <Nick.Whitelegg at solent.ac.uk> wrote:
>
>
> On further experimentation, SVG is proving somewhat infeasible at the
> moment if everything (all nodes, segments and uploaded trackpoints) is
> treated as a DOM node. Performance for just nodes and segments is
> acceptable but if all uploaded trackpoints in a sensible area (4km x 4km
> square) are added, the app a PIII with 256mb memory running Firefox 1.5
> /Windows 2000 ground to a halt. Even on a Linux/3ghz/1gb/Firefox 1.5
> machine, it was on the slow side.
>

That's not got a great deal to do with SVG.  You'll recall that we
dropped the dynamic rendering of GPS tracks from the applet too and
moved to pre-rendered images for this very reason.  One solution is to
filter the points by user and by time - this functionality
simulataneously makes it possible AND useful to send raw track data to
the client.

> While the trackpoints could just be added as background graphics, not
> having them as nodes would lose one of the principal benefits of SVG (being
> able to treat everything as an addressable object) anyhow.
>

In an applet, you can also render things to images on the client side
for quite a big speed improvement (the OSM applet doesn't do this yet
but I'd recommend the approach for track points at least, if not nodes
and segments/streets too).  I don't know if you can do this with SVG,
or if SVG has a concept of layers or anything else that would allow it
to optimise the drawing - anyone?

Tom.




More information about the dev mailing list