On Wed, Mar 4, 2009 at 8:30 AM, Markus Meyer <me...@mesw.de> wrote:

> Brian Busch schrieb:
> > Markus - he included the stack trace on his first post:
>
> Okay, I missed that, sorry.


I missed it the first time too!

>  java.lang.OutOfMemoryError: Java heap space
> >     at java.lang.String.toCharArray(String.java:2726)
> >     at com.lowagie.text.pdf.PdfName.<init>(Unknown Source)
>
> I agree that it probably really is a memory issue then. Still I think
> one could debug into the trace to make sure it isn't doing something
> stupid, like trying to copy ridiculously large strings because of a
> parser problem in iText or something like that.


Agree - I fear that he might not have a good understanding of memory/JVM
usage as he posted several times things like "it must not be a memory limit"
when it was, and "I close the reader each time" and "the files are
identical" -- all things that might indicate a less than clear knowledge of
jvm's and their memory foot print. He did say the Adobe product had no
problem doing this - but I'm sure that was a C++/C# application on a windows
box - not the same animal as a JVM with async garbage collection and a
less-that-ideal method for tuning memory usage.

I only use iText to write RTFs and have very little knowledge of PDF and
iText's implementation; by the stack trace - I note that it certainly is
doing string conversions from whatever is read in from the PDF - a 1GB PDF
is going to be VERY large in a JVM if completely read in. As stated before,
I've seen a 10:1 ratio of memory usage on strings (at its worse) for one
system I tuned.

There may be other ways to do what he's doing -- I don't know iText that
well.

But expecting 9GB of files to be read (in whatever amount necessary to sign
it) into a JVM is a stretch. There are myriad options available to work
around this - we just don't know his constraints (e.g., it is a service
called by SOAP, or, it's in a app service, or it could be coded to do one
file at a time in a script so one jvm doesn't need to load so much, etc.)

We need to know more data about his environment before I can help (if I
can).

Brian
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to