- May 4, 2001
- 15,381
- 6
- 91
I've written a program that does validation and QA with DICOM images. Part of the program displays the images in a JPanel and the user can scroll through the set by slider, mouse wheel, etc... Also, the user can dynamically change the image's window width and centers with sliders as well as vertical and horizontal mouse drag events on the panel. Window width and centers can be visually likened to brightness and contrast, but...different. It's more to do with other information stored inside the file header.
Each redraw or scrolling requires re-accessing the file to create a new BufferedImage. On linux, this is instantaneous. Windows, OTOH, has to chug along step by step by step for any redraws/scrolls.
I assumed the performance difference came form Linux caching recently accessed files in memory (from prior methods for other purposes), and Windows must be accessing the HDD for each operation.
So I tried creating a Vector of BufferedImages (rendered with default widths and centers), so it should be quick access from memory. However, Windows still chugs along slowly when scrolling through the default images.
So...I'm not sure what to do. How can I make it butter-smooth in Windows, as it is in Linux?
Each redraw or scrolling requires re-accessing the file to create a new BufferedImage. On linux, this is instantaneous. Windows, OTOH, has to chug along step by step by step for any redraws/scrolls.
I assumed the performance difference came form Linux caching recently accessed files in memory (from prior methods for other purposes), and Windows must be accessing the HDD for each operation.
So I tried creating a Vector of BufferedImages (rendered with default widths and centers), so it should be quick access from memory. However, Windows still chugs along slowly when scrolling through the default images.
So...I'm not sure what to do. How can I make it butter-smooth in Windows, as it is in Linux?
