RE: [OpenMap Users] OMGraphicHandler Layer and high CPU usage

From: King, Sean <>
Date: Tue, 28 Jun 2005 14:11:31 -0400

Thanks for your quick responses. All the CPU performance issues seem
to stem from my terrain layer. When disabling the terrain layer, the X
Server CPU usage drops to 1 percent. I changed the render policy on
the terrain layers to BufferdImageRenderPolicy and that seems cut down X
server performance by 10 percent (X server average 18 percent CPU usage
w/out zooming). I still get large spike when zooming w/ my terrain
layer turned on, though. Thanks again for all the quick responses.


Sean King





From: Rob Ratcliff []
Sent: Tuesday, June 28, 2005 12:45 PM
To: King, Sean
Subject: Re: [OpenMap Users] OMGraphicHandler Layer and high CPU usage


We've had to deal with this as well in the past. Here are a few things
you can try::

1.) Set the render policy of especially any layers that draw lots of
lines (like the VPF layer) to BufferedImageRenderPolicy
(This has a huge impact on the X Server performance.)

2.) try changing these settings:
       setenv J2D_PIXMAPS server|shared
       java -Dsun.java2d.pmoffscreen=false|trure

3.) Create a timer that calls repaint on the layers every n seconds
rather than repainting every time there is a change.

4.) Create an image buffer (an extension of buffered map bean) that
paints all layers that don't change except during projection changes.

5.) Track the dirty region of the map and call repaint specifying the
dirty rectangle.

Hope that helps!


King, Sean wrote:

I have recently have taken over some map development for a project that
keeps track of objects moving around on a map. There are multiple
dynamic layers that need to be updated continuously (say once a second)
on a detailed terrain. Currently the layers are being repainted every
second. This appears work fine in Windows but in Linux I am
experiencing the high levels of CPU usage on the X Server process which
make map functionality slow. It seems the cause of the high level of X
usage is because of the repaints to the OMGraphicHandlerLayers. Zooming
in and out on the map also causes high CPU usage w/ the X server but I
am sure this stems from the same repaint problems. Zooming in the
OpenMap demo doesn't cause high CPU usage so I am sure the fault lies
w/in our code.


My question is, has anybody experience similar problems in Linux before
and does anybody have some insight on how to fix this problem?
Currently, all the layers are calling repaint(). Should I just call
repaint(x,y,h,w) on the moving objects w/in the layer.




Sean King




[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jun 28 2005 - 14:13:33 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT