Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Here's a change that speeds up initialization of a VisAD display. My program startup went from 60 sec. to 30 sec. without any apparent negative effects. I had to modify DisplayImpl instead of just extend it, since I didn't want to change all the places that instantiate it. Therefore, I give the diff output. This is based on the VisAD version with a doc/DATE of Thu Nov 1 09:21:01 CST 2001. If you're looking at a different version, look near the end of the last addReferences method. 1049c1049,1053 < synchronized (mapslock) { --- > // Don't need to synchronize if only a single thread is involved. > // Since mapslock is declared as a private instance field, it can > // only be accessed by this instance of DisplayImpl. > System.out.println("Running modified DisplayImpl.addReferences"); > //synchronized (mapslock) { 1051c1055 < } --- > //} What are the situations where mapslock could be accessed by more than one thread? Is synchronization only necessary when doing distributed computing with RMI? If so, could we have an option in VisAD to turn off support for distributed computing when we don't need it? Such an option might be useful elsewhere as well. Randall W. Simons Sandia National Laboratories
visad
archives: