Summary: | Image processing makes FOP really slow | ||
---|---|---|---|
Product: | Fop - Now in Jira | Reporter: | Jonathan Levinson <levinson> |
Component: | general | Assignee: | fop-dev |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 0.95 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: |
image testing file
Image used |
Created attachment 24386 [details]
Image used
Image used
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. 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 Fixed in patch. http://svn.apache.org/viewvc?rev=828814&view=rev (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? 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. (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/ (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. resetting P2 open bugs to P3 pending further review |
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.