[Potlatch-dev] Couple of new under-the-hood refinements

Richard Fairhurst richard at systemeD.net
Wed Dec 28 15:43:43 GMT 2011


I've just committed two new features to P2 that should make it feel a 
lot "snappier".

First of all, when you pan to a new area, P2 only asks for the areas 
that aren't yet loaded, rather than the whole bbox. In other words, less 
data gets downloaded from the server. You can see that it's making 
multiple smaller requests because the display at the top right will read 
"Loading data (3)..." or similar.

The Gnarly Algorithm to work out which requests were needed was put 
together (and subsequently refined) by Matt, and Tom helped me convert 
it from Ruby to AS3, so thanks both!

This should help with the problem Andreas Hammershøj reported at 
http://lists.openstreetmap.org/pipermail/dev/2011-December/023945.html , 
though I'm also planning to add an option for a secondary read server 
(e.g. Overpass API) too. P2 currently flushes its internal data store 
once 3,000 ways have been loaded, but I'm planning to raise this limit 
once the quadtree branch 
(https://github.com/systemed/potlatch2/tree/quadtree) is ready.

Secondly, P2 now uses "native cursors" (a Flash 10.2 improvement) for 
the custom pointers when drawing. These are much less jerky than the 
old-style Flash pointers.

As ever, both of these will hopefully be deployed on osm.org soon, but 
if you're building your own P2 from the systemed repo, you can try them now.

cheers
Richard




More information about the Potlatch-dev mailing list