>>>>> "GWJ" == G Wade Johnson <[EMAIL PROTECTED]> writes:

GWJ> I have an application that loads an SVG file into a JSVGCanvas
GWJ> object for display.

GWJ> Batik 1.5b4.  Java 1.4.1_01 Windows 2000, SP2

GWJ> I have been handed a large SVG file (10M) to display. The display
GWJ> fails with a java.lang.OutOfMemoryError exception. When I checked
GWJ> my system, I was sitting at 200M used on a 128M system. Okay, no
GWJ> surprise.

GWJ> Next I tried to run the same app, with the same file, on a
GWJ> machine with 500M of RAM. This application failed with the same
GWJ> exception, even though only 300M of memory was in use.

GWJ> Is there some arbitrary limit to the amount of memory I can
GWJ> allocate with Batik and Java?

     Since you don't mention it in your note, I assume you are not
aware of the '-Xmx<size>mb' option to the JVM. This allows you to set
the max size of the Java Heap (I think it defaults to 64MB).  For such
a large file you might save time also specifying '-Xms<size>mb' which
is the starting size of the heap (reduces the number of Full GC's).

So I suggest something like:

   java -Xmx500mb -Xms100mb -jar batik-squiggle.jar

   You might be able to set these through the Java control panel on
Windows, but I usually do this stuff from the DOS prompt.

GWJ> Before you ask, I don't intend to run with a file this large in
GWJ> general.  It's being used as a worst-case scenario for testing my
GWJ> program.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to