Hi Thomas,
I have the same problem as Khurram, except for the animation as I don't
use any.
An example SVG file of mine would be ~4 MB in size
A total of a little over 11,000 elements.
Most of the tags are one of "a, desc, ellipse, g, image, line,
path, polygon, polyline, rect, set, style, text, title".
Some tags like style have < 10 entries. Others like line, polygon
> 1000 instances. But then again, this is just an example.
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...
Thanks,
Praveen
[email protected]
13/10/2009 03:18 PM
Please respond to
[email protected]
To
[email protected]
cc
[email protected]
Subject
Re: BATIK Memory consumption is too high
Hi Kurram,
Khurram Zaman <[email protected]> wrote on 10/12/2009 02:45:38 AM:
> We are using BATIK for rendering SVG in java applets. Our SVGs are
> of pretty big size (in MB's). This SVG gets animated as well. We
> need to unload and load different SVGs.
> What are the possible techniques to solve this?
Yes, possibly, some aspects of SVG are more memory intensive
than others. What sort of SVG files are you working with (what
features are you using).
> Can any flags help?
Well, I think you can raise the default partition for Java
Applets. You might look at that.
> Can I optimize the BATIK memory usage through its code?
Only if you want to rewrite large parts of the code base...
> Also is BATIK not feasible for big SVGs?
The default partition for Java is something like 32-64MB of
memory - this is barely enough memory to decode your typical 10MP
JPEG. The packing factor for SVG is typically much higher. So
I would suggest looking for ways to increase the default memory
partition of the Java Virtual Machine.