Thomas DeWeese wrote:
> > I have a map with a bunch of rooms, and what I'm doing is changing
> > the fills in each room to make them different colors, gradients, etc. 
> > It's useful to "batch" together all the initial updates that color
> > all the rooms when the map is first loaded.
> 
>     Sure you should be able to do that easily by just doing the all
> the initial updates in one runnable.  How many rooms are we talking
> about?  I'm surprised that just updating fill is that taxing.
> 
>    How complex are the gradients?

These are just linear gradients with reflection (ie stripes) and
solid fills. There are about 35 rooms on this map.

Before I increased the MIN_REPAINT_TIME it would fill the rooms in
6 or 8 rendering updates, each updating a few rooms at a time.

Increasing MIN_REPAINT_TIME lets it draw them all at once, and the
total time to draw them is much less.

It's as if there were some extra overhead associated with the
rendering cycles themselves.

The underlying map is derived from a AutoCad file and has lots of
detail, so I don't know if that plays a part or not. It is a lot of
SVG elements but they remain unchanged while the application runs.

> > One thing that's interesting is that it seems that adding/modifying
> > the "fill" attribute of a <polygon> directly updates slightly faster
> > than adding a new <use> element which references the <polygon> with
> > a different "fill". Must be due to the creation of a new GVT node
> > in the latter case but not the former?
> 
>     Use has quite a lot of extra overhead.  Also if you 'overlay' the
> original polygon with a use the renderer will have to draw both.
> One thing you might consider is using visibility (not display).
> So if each room has two or three views I would create all of them
> and then adjust visibility so the desired one is showing.

Hadn't thought of that idea-- it definitely sounds like a good one.

Thanks!
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to