[Xastir-Dev] some ideas for map speedups

Alan Crosswell alan at columbia.edu
Mon Jul 7 12:41:42 EDT 2003


Wow!  Sounds like Curt was real busy last weekend while I was communing with 
nature in the Adirondacks ("Hey, pass me the can of insect repellent?"  "Does 
anybody have matches?" :-)

I jotted down some ideas for improving vector map performance on the train this AM:

- Insinuate an intermediate vector data structure layer between the map-specific 
file reading functions and the map display functions (instead of directly 
invoking X drawing functions).  This then canonicalizes all vector maps to a 
single Xastir internal data structure which captures the attributes we care about.

- Cache these vectors into memory up to a certain configurable memory limit.

- Sort the memory vector list by display_level:  Major features that display at 
level 8192 are earlier in the list, those that display at level 1 are last in 
the list.  When rendering, it becomes really easy to decide when to stop -- and 
the map draws in order of feature prominence.

- Cache 25%(?) more than the current viewport to support quick panning and 
zooming out.

- Use available idle cycles in a low-priority thread to continue filling out 
around the edges of the viewport and drilling down to more detailed vectors 
(remembering the above sorting).

- Get really smart and use dead reckoning prediction when tracking a moving 
station to determine what to render/cache next.

- Potentially allow writing this cache out to disk for faster reuse and to 
support "swapping."

/a



More information about the Xastir-dev mailing list