Thus spake Praveen Nayak2: > > This file uses up near 100 MB of memory causing Java plugin to croak, > unless we tinker with the memory limit. Like Khurram I wonder if I can > reduce the memory footprint... >
You should look at your program in a profiler to see how that memory is being used. I'm going to take a wild guess and say that a substantial portion of your memory usage is due to having a very large BufferedImage to which you're rendering. (This is the case for an app I work on.) If that turns out to be the situation you have, and you're usually displaying only a portion of the image at any one time, a possible solution is to render the SVG as small tiles, for which you keep SoftReferences. That way, when memory gets tight, some of the tiles will be garbage collected and will have to be rendered again later, but you won't have the cost of having a gigantic BufferedImage in memory. -- J. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
