[OSM-dev] Ways on the new renderer... maybe usable after all!

David Sheldon dave-osm at earth.li
Fri Jun 30 15:30:32 BST 2006


On Fri, Jun 30, 2006 at 04:15:50PM +0200, Lars Aronsson wrote:
> Adding more hardware is not going to solve this.  We'd have to 
> wait ten years for Moore's law to have that effect.  So how are we 
> going to solve it?

As far as I can tell, the only way to improve it is to change the
datastructures in the database. Maybe denormalise a bit. 

The SQL at the moment requires many queries for a single tile. You will
not get 40ms response times when you are calling that many queries.

One major improvement would be to not use the massive generated IN
clauses in order to find the segments for your points. These tend to be
O(N^2) at least in the parsing and query-planning stages. As we get more
data and/or areas get larger then there will be more entries in these in
clauses.


Removing the historical data from the tables will be a good start (and
we keep on comming back to this). Maybe we should be rendering from
another copy that only has the most recent entries. Why do we need to
know all of the nodes in order to draw the map? Surely we only need
segments, so doing it via the nodes is probably wrong, but the node SQL
is too complicated at the moment to move it into joins on the segments. 

Then we would have to look into ways.

David
-- 
"Some of the most interesting conversations I've had were with inanimate
objects. They don't try to tactfully steer the conversation away from the
vampires that run the city from the bodlian bookstack..."
  -- Grasshopper




More information about the dev mailing list