[Xastir] CPU usage
Curt Mills, WE7U
hacker at tc.fluke.com
Wed Aug 13 18:15:29 EDT 2003
On Wed, 13 Aug 2003, Dick C. Reichenbach wrote:
> On map redrawing? Does the thread load the whole file first and then
> work with it out of memory, or do you process the points as it is loaded
> in?
It's processed a point at a time as we load.
> Also, another point, I noticed that when I change scale from close
> to far, If I have say, for example, Dayton.pdb, Columbus.pdb, and
> Ohio.pdb active, and I zoom out to include Indiana.pdb, Kentucky.pdb,
> and WestVirgina.pdb, it has to take the time to reload and reprocess,
> Dayton, Columbus and Ohio. Why? If the map points are already loaded
> in memory.
They're not already in memory. They are processed, drawn, then
forgotten. We don't cache anything in memory other than the image
we created while drawing.
What we have is:
pixmap maps
pixmap_alerts maps + alerts
pixmap_final maps + alerts + symbols/tracks
da (drawing area) same as last
We draw maps into pixmap. We then copy that data to pixmap_alerts
and draw the weather alerts on top of it. We then copy that data to
pixmap_final and draw symbols/tracks. We then copy that to "da"
and it's then displayed on the screen.
The reason for these multiple layers: If no zooming/panning is
going on, we can quickly draw starting at the alerts. If no alerts
are changing, we start at the symbol/tracks. This speeds things up
overall.
Once you starting zooming/panning, you have to start from scratch.
--
Curt Mills, WE7U hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto: A tax on people who are bad at math!"
"Windows: Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me: I picked the coordinate system!"
More information about the Xastir
mailing list