[Xastir] Map Drawing Tweaks

BobDonnell at arkalmus.com BobDonnell at arkalmus.com
Tue Jun 17 16:26:42 EDT 2003


Hi Everybody!

Here are some thought for improving the map drawing process.  These are
based on observations I had with a sequence of events last night,
driving on my way home from SeaPac.

1) When drawing vector maps, object that would render as shorter than
0.5 pixels should be discarded.  Objects to be rendered at less then 2
pixels should be rendered as a single pixel.  If the length calculations
for the object are done early or first in the evaluation process, it
should be easy to toss out a lot of objects that "just don't count".
This is significant when a large area of vector maps are available, and
the zoom level (range scale, too) is high.  In my case (more below) it
was trying to load all the available vector maps (palm, pacific
northwest Tiger, WinAPRS) on the hard drive for a zoom window that grew
to encompass the world.

2) When an event that requires a map redraw occurs, read the event queue
to see if there are any other events that would cause a subsequent
immediate redraw.  Modify the parameters for the redraw window to
reflect the additional events, until all such events are cleared from
the queue.  This would reduce the occurrence of redraw cycles occurring
"endlessly" (and killing performance) for acts like resizing the window,
and (what happened to me) having a page up/down or arrow key get held
down such that many (many!) events get queued.  Even after using chmod
to make the map directories unreadable, I waited (and drove) for 90 more
minutes before giving up and killing X to end the session.  Using 'kill
-9 <pid>' wouldn't end the pain.  Granted, this is on a P150MMX, but
it's a computer I'm willing to leave in the car, and it handles all of
the other details of running Xastir sufficiently.

I think the second item could be improved further by implementing a
short time delay from the last map-modifying keystroke or mouse event
until a redraw is started, with the keystroke queue being checked to see
if the next keystroke or mouse event (if any) also modifies the map
redraw window parameters.  Curt suggested that the time delay could be
en/disabled as a setting.  We both decided that a slider bar for the
time delay is way over the top  :-)

73, Bob, KD7NM

-------------------------------------------------
Robert Donnell, KD7NM
14507 Madison Way
Lynnwood, WA  98037
Ph: 425-741-0999
Mailto:kd7nm at pugetsound.net
-------------------------------------------------





More information about the Xastir mailing list