|Summary:||Image processing makes FOP really slow|
|Product:||Fop - Now in Jira||Reporter:||Jonathan Levinson <levinson>|
image testing file
Description Jonathan Levinson 2009-10-16 11:44:13 UTC
Created attachment 24385 [details] image testing file In investigating a problem in the display of PNG images in FOP, I discovered that image processing was really slow. Examining the code in a debugger the surprise is that the source of slowness is not the rendering of the image (which is done through Java’s JAI) but in the steps leading up to the rendering of the image. For a simple FO page, with a single PNG image FOP takes 90 seconds. Remove the image and FOP takes 1 second. RenderX takes a second as well with our without the image. So the addition of a single image to an FO page results in extreme slowness – two orders of magnitude slower than RenderX XEP.
Comment 1 Jonathan Levinson 2009-10-16 11:44:41 UTC
Created attachment 24386 [details] Image used Image used
Comment 2 Sean Griffin 2009-10-19 07:16:33 UTC
Can you describe what steps leading up to the rendering that you identified as the slow points? Also maybe more about your environment (max heap, etc.). I tried this myself with just the default max heap size and was able to create the PDF in under 0.5 sec using the client Hotspot JVM.
Comment 3 Jonathan Levinson 2009-10-19 11:13:56 UTC
I am on Windows XP with 3.5 Gig of memory. I am running on a Dell Latitude D630 laptop. Dual Core. 2.6 GHz. C:\jai-1_1\lib>java -version java version "1.6.0_10" Java(TM) SE Runtime Environment (build 1.6.0_10-b33) Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing) I have JAI 1.1.3 installed and am able to run the demos. Right now, I can't get fop-0.95 to display the image because I get the error: SEVERE: Image not available: No ImagePreloader found for file:///perforce/Users/levinson/B47157/test-image.png
Comment 4 Jonathan Levinson 2009-10-22 11:59:13 UTC
Fixed in patch. http://svn.apache.org/viewvc?rev=828814&view=rev
Comment 5 Eric 2010-03-10 19:41:14 UTC
(In reply to comment #4) > Fixed in patch. > http://svn.apache.org/viewvc?rev=828814&view=rev The problem reported is with FOP. This patch is for the xmlgraphics project. The download for FOP 0.95 includes an xmlgraphics jar. Is it recommended to use newer versions of the projects referenced by FOP than the ones it comes with? Is there a compiled download of the trunks or are they just source? Should the xmlgraphics trunk be used with the FOP trunk?
Comment 6 Chris Bowditch 2010-03-11 11:49:34 UTC
There are no builds of trunk FOP available. Just the source, so you have to download from SVN and build locally. You have to keep FOP and xgc versions in sync. So if you want to use trunk xgc then you will have to use trunk FOP as well.
Comment 7 Vincent Hennebert 2010-03-11 12:00:01 UTC
(In reply to comment #6) > There are no builds of trunk FOP available. Just the source, so you have to > download from SVN and build locally. Actually, nightly builds are available there: FOP: http://vc.apache.org/snapshots/fop/ XML Graphics: http://vc.apache.org/snapshots/xmlgraphics-commons/
Comment 8 Chris Bowditch 2010-03-11 12:23:41 UTC
(In reply to comment #7) > (In reply to comment #6) > > There are no builds of trunk FOP available. Just the source, so you have to > > download from SVN and build locally. > Actually, nightly builds are available there: > FOP: http://vc.apache.org/snapshots/fop/ > XML Graphics: http://vc.apache.org/snapshots/xmlgraphics-commons/ It's great that we've restored the overnight builds. I've added a link on the FOP website in revision 921823. Probably need to do the same for xgc too so that we avoid confusion in the future.
Comment 9 Glenn Adams 2012-04-07 01:41:56 UTC
resetting P2 open bugs to P3 pending further review