next up previous contents
Next: TrueColor Support Up: Appendices Previous: Overlay Files   Contents


Memory Management and Large Images

One of the biggest changes between aipsview Version 1 and Version 2 has been in the low level memory handling routines. Previous releases would memory map an entire file if it contained floating point data and no blanked elements. Otherwise, the entire file would be read into an array.

With aipsview Version 2.1+, the FITS reader has been almost completely rewritten. FITS files are never read into memory. Rather, a ``window'' is mapped onto the file and slid around as needed. This has a number of benefits:

Notes:

  1. Aipsview must go to the mapped file for every data access, such as data picking. With large NFS mounted files, this may slow performance.

  2. There is greater overhead to access data since aipsview must check to make sure the data is within the current window. The current maximum window size is approximately 16 MB so most files will always be entirely mapped.

  3. Note, if the data minimum and maximum are not present in the header of the file, they must be calculated by aipsview when the data set is first opened. On large images, this can take a significant amount of time. Thus, if you are going to be reading a large image repeatedly with aipsview, consider setting the data minimum and maximum in the header of the data set.

There are two other areas of memory usage to consider. First, aipsview sometimes needs to allocate space large enough to hold an entire data plane, (when doing contours for instance). It also needs to allocate buffers when building an image to be sent to the X display. These buffers add up to roughly three times the size of the displayed image.

Secondly, aipsview creates off screen pixmaps to store images. Every frame of a movie takes as much space as the size of the image. (e.g., A 512$\times$512 8 bit image will take 256 kB). This space is reserved on the X server. Pixmaps aren't created until the first time they are needed.


next up previous contents
Next: TrueColor Support Up: Appendices Previous: Overlay Files   Contents