xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Batik and memory consumption
Date Thu, 13 Nov 2008 19:04:14 GMT
On 13.11.2008 18:32:32 Lars Eirik Rønning wrote:
> Hi.I noticed that when i used fop 0.95 it prints "resolving file : ....jpg"
> When i embed as base64 it prints the base64 string out.
> Why do you print this string?

Is that the exact logging message? I haven't found the string "resolving
file" anywhere in the codebase. Anyway, we do have some logging
statements inside FOP and XML Graphics Commons but they only appear if
the necessary log levels are activated. At any rate, those can be
disabled by adjusting the logging configuration.

> Also what are the major differences between fop0.20 which requires lots of
> ram to output the pdf, whereas 0.95 does this in a split second;)

I assume it's the addition of a specialized class (an image bridge) to
embed JPEG images in PDF without decompressing them. Furthermore, I've
invested a lot in avoiding unnecessary buffering and format conversions.

> Lars
> 
> On Tue, Nov 4, 2008 at 10:06 PM, Jeremias Maerki <dev@jeremias-maerki.ch>wrote:
> 
> > On 04.11.2008 21:39:33 Lars Eirik Rønning wrote:
> > > I will do that once i get back to the office.
> > > In terms of memory consumption how many mb do you think i need to
> > allocate
> > > the process which handles large images such as 12mega pixels?
> >
> > If there's no color profile and you're not doing any SVG filtering and
> > you're producing PDF, not more than a few kilobytes (some metadata plus
> > some I/O buffers). I've just successfully run a test where I put a JPEG
> > (7634x6745 px) in an SVG file and converted it to a PDF using FOP 0.95
> > and -Xmx16M.
> >
> > > In my code i allocate 350mb , but this still seems to crash.
> > >
> > >
> > > On Tue, Nov 4, 2008 at 9:28 PM, Jeremias Maerki <dev@jeremias-maerki.ch
> > >wrote:
> > >
> > > > Not really. Can you send me a test case so I can run it here?
> > > >
> > > > On 04.11.2008 21:21:09 Lars Eirik Rønning wrote:
> > > > > Hi.
> > > > > When i try to run fop-0.95 with batik it seems to have problems with
> > > > > handling images.
> > > > > When trying to handle the image it prints something which looks like
> > a
> > > > > base64encoded string and after this gives up.
> > > > >
> > > > > I do not have this issue when runniing batik1.7 with the included
> > > > > pdftranscoder.jar. unless it runs out of memory.
> > > > > Memory issue does not seem to be the problem this time though.
> > > > >
> > > > > Any ideas?
> > > > > Lars.
> > > > >
> > > > > On Tue, Nov 4, 2008 at 4:15 PM, Jeremias Maerki
> > <dev@jeremias-maerki.ch
> > > > >wrote:
> > > > >
> > > > > >
> > > > > > On 04.11.2008 16:03:13 Lars Eirik Rønning wrote:
> > > > > > > I get this when trying to run with fop0.95 in my
> > project:Exception in
> > > > > > thread
> > > > > > > "main" java.lang.NoClassDefFoundError:
> > > > > > > org/apache/avalon/framework/configuration/DefaultConfiguration
> > > > > >
> > > > > > That means you don't have Avalon Framework in your classpath.
> > > > > >
> > > > > > >         at
> > > > > > >
> > org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:172)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > >
> > org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
> > > > > > >
> > > > > > > I use maven,  but this does not seem to work..
> > > > > >
> > > > > > That something doesn't work when Maven is used is no news to
me.
> > That's
> > > > > > why I don't use Maven.
> > > > > >
> > > > > > > On Tue, Nov 4, 2008 at 1:52 PM, Lars Eirik Rønning <
> > > > larseirik@gmail.com
> > > > > > >wrote:
> > > > > > >
> > > > > > > > We wish to use maven.Is there any easy way to find
the maven
> > 0.95
> > > > with
> > > > > > all
> > > > > > > > its dependencies?
> > > > > > > >
> > > > > > > > Thanks again.
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Nov 4, 2008 at 1:45 PM, Lars Eirik Rønning
<
> > > > > > larseirik@gmail.com>wrote:
> > > > > > > >
> > > > > > > >> Hi. all i do is to have my svg document include
the image.When
> > i
> > > > run
> > > > > > > >> pdftranscoder its easting lots of ram.
> > > > > > > >>
> > > > > > > >> the version i am using at the moment is the one
which is
> > shipped
> > > > with
> > > > > > > >> batik..
> > > > > > > >> Basically i use the pdftranscoder.jar file.
> > > > > > > >>
> > > > > > > >> I was unable to get it working when running with
fop.jar
> > > > > > > >> Hope you are able to help me further.
> > > > > > > >>
> > > > > > > >> Batik1.7 is the binary distro i am using.
> > > > > > > >>
> > > > > > > >> ps.i will try what you suggested with running
fop0.95
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On Tue, Nov 4, 2008 at 1:31 PM, Jeremias Maerki
> > > > > > <dev@jeremias-maerki.ch>wrote:
> > > > > > > >>
> > > > > > > >>> Would you mind checking if you have a similar
memory
> > consumption
> > > > if
> > > > > > you
> > > > > > > >>> install FOP 0.95 and run:
> > > > > > > >>> fop -imagein myimage.svg -pdf myimage.jpg
> > > > > > > >>> ??? I'm asking since you might be running
on older code that
> > > > might
> > > > > > not
> > > > > > > >>> efficiently process JPEG images.
> > > > > > > >>>
> > > > > > > >>> I guess it also depends what you're doing
with the JPEG
> > image. If
> > > > it
> > > > > > is
> > > > > > > >>> run through filter operations the JPEG image
has to be
> > decoded in
> > > > > > memory.
> > > > > > > >>> If not it should theoretically not load the
JPEG file into
> > memory
> > > > but
> > > > > > > >>> efficiently pass it into the PDF undecoded.
However, if it
> > has a
> > > > > > color
> > > > > > > >>> profile, that could use up some memory.
> > > > > > > >>>
> > > > > > > >>> On 04.11.2008 13:19:26 Lars Eirik Rønning
wrote:
> > > > > > > >>> > Hi.When i try to render a pdf from batik
using jpg images
> > of
> > > > high
> > > > > > > >>> quality
> > > > > > > >>> > the memory consumption is extremely high.
> > > > > > > >>> > I tested this now with a 12mp image (4000*3000).
> > > > > > > >>> > In order to have this output the pdf
correctly with the
> > > > > > pdftranscoder
> > > > > > > >>> it
> > > > > > > >>> > needs almost 600mb.
> > > > > > > >>> >
> > > > > > > >>> > Any way  of improving this?
> > > > > > > >>> >
> > > > > > > >>> > Thanks guys, Batik rocks.
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>> Jeremias Maerki
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > ---------------------------------------------------------------------
> > > > > > > >>> To unsubscribe, e-mail:
> > > > > > batik-users-unsubscribe@xmlgraphics.apache.org
> > > > > > > >>> For additional commands, e-mail:
> > > > > > batik-users-help@xmlgraphics.apache.org
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Jeremias Maerki
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> > > > Jeremias Maerki
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > > > For additional commands, e-mail:
> > batik-users-help@xmlgraphics.apache.org
> > > >
> > > >
> >
> >
> >
> >
> > Jeremias Maerki
> >




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message