RE: DisplayImpl Simplified: addReferences

Hi Randall,

> Are these the only threads that access the DisplayImpl objects?  How many
> are there for each Display?  Is there somewhere I should look in the
> documentation or code to learn more about the thread structure of VisAD?

mapslock protects almost all of the doAction() method,
where Data objects are transformed into scene graphs
under the DisplayImpl's own Thread. mapslock also
protects the methods by which any Thread can add or
remove DataReferences to a DisplayImpl. Thus it is needed.
The big performance gain you see in removing the use
of mapslock in addReferences() might also be acheivable
by enclosing the sequence of operations on your
DisplayImpl between calls to display.disableAction()
and display.enableAction(). Probably your first
addReferences() triggers a call to doAction(), which
locks out later addReferences() calls. The disableAction()
will prevent the doAction() call until the enableAction().

Good luck,
Bill