Re: change color optimization and Re: disableAction

On Thu, 21 Feb 2002, Doug Lindholm wrote:
> Adding a setRange call to my ScalarMap to RGB does indeed seem to take
> care of it! So, is that a bug or a feature?

That's how VisAD works. Its keeps trying to autoscale as
long as there are ScalarMaps without range information.

> On a related note, I get similar delays when I have non-null image Data
> added to the Display but with the DataRenderer toggled off. If I toggle
> the Data on then back off, all is well. Also, that first toggle on is
> slow (with "please wait"), while additional toggles are fast (usually -
> sometimes I get the delay toggling it on but I haven't found a
> reproducible case, yet). Also, the auto axis scaling isn't applied until
> the first toggle on. Is that by design (e.g. faster startup)? Maybe
> using setRange to disable autoscaling will help this also. The jury is
> still out.

Yeah, if you are having speed problems due to autoscaling,
just call setRange() on your ScalarMaps. Any unpredictability
is just a race between your application thread and the
DisplayImpl thread.

This is just the way VisAD works, and is not related to
any memory leak.

> What are the appropriate circumstances for using
> DisplayImpl.disableAction()? When does it need to be enabled? I'm afraid
> if I use it too liberally, I will disable something I shouldn't.

Whenever you want to prevent any transform of Data into scene
graphs, typically when you are calling a sequence of methods
that would each trigger transform, but only want transform to
happen once at the end.

Bill