Re: [OpenMap Users] animated OMGraphic performance

From: George Uecker <george.uecker_at_dot21rts.com>
Date: Fri, 10 Dec 2004 11:22:46 -0500

Hi Jim,

DISCLAIMER: I'm still using OpenMap 4.5.4.

I think what you probably want to do is to use a BufferedLayerMapBean
instead of BufferedMapBean, and set the Background flag for your static
map layer(s). In your properties file, just add the following property:

yourLayerMarkerName.background=true

for any layers that don't need to be regenerated for every repaint.
This way the map layers are calculated once, say, when the projection
changes, and stored in a "Background Layer Set" image buffer.
Subsequent repaints just blit the stored image to the screen for those
layers, resulting in huge graphics performance improvements. You should
then be able to regenerate and repaint your dynamic OMGraphics at
1-second intervals with no problem, and you shouldn't have to worry
about clipping areas.

Another performance tip: don't regenerate any graphics that haven't
changed since the last generate/paint cycle. Just paint the previously
generated graphic again.

Hope this helps,

George

Hope, James wrote:

> Hi
>
>
>
> I'm currently writing a layer that animates OMGraphics on the map and
> is driven by a remote server sending update events every second.
>
>
>
> Unfortunately when I have about 10 graphics moving around, updating
> every second, the fast dual processor machine it is running on can
> hardly cope!
>
>
>
> Obviously calling repaint() on the entire map takes way too long, so I
> am calculating the invalidated area of the map for each moved graphic
> and calling repaintChildren() for that area on the BufferedMapBean.
> Not only is this not fast enough but it also brings with it a whole
> world of problems with other layers not getting refreshed properly
> because the clipping area has changed.
>
>
>
> There must be a way of improving the performance beyond this. Does
> anyone have any tips?
>
>
>
> Thanks in advance
>
>
>
> Jim
>
>
>
>
>
> ********************************************************************
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> ********************************************************************
>

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Dec 10 2004 - 11:30:25 EST

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