xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Puppala, Kumar (LNG-CON)" <kumar.pupp...@lexisnexis.com>
Subject Fop 0.20.5 vs Fop Trunk Performace
Date Tue, 12 Feb 2008 16:06:15 GMT
We are currently using FOP 0.20.5 on our production boxes and intend to
use the latest FOP at some point this year. As such, we are trying to
gauge performance improvements between the two. However, I am finding
that the new FOP is taking more time to render than the old one. The
options used to run the FOP (both old and new) are as shown below:

 

/usr/local/jvta/jre1.6.0_02/bin/java
-Djava.endorsed.dirs=/usr/local/java/pkgs/jmx1.0.1 -server -Xms128m
-Xmx1024m -XX:MaxPermSize=128m -verbose:gc -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps -DJMX_1_2=true -D -Sqds_fop_dev5_001
-javaagent:/opt/wily/Agent.jar
-Dcom.wily.introscope.agentProfile=/l-n/app/sysman/wily/default/Agent_ti
er1.profile -Dcom.wily.introscope.agentName=FOP -Dpid=11403
com.lxnx.ols.qds.fop.gen.server.FOPServer

 

 

The way we instantiate the new FOP within our server is as shown below:

 

             // configure fopFactory as desired   --> DONE in the
constructor...placing here just for easy reference

             FopFactory fopFactory = FopFactory.newInstance();   

             fopFactory.setStrictValidation(false);

 
fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);

  

            

            fopFactory.setUserConfig(new File(userConfigFileStr))

            FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

            // Construct fop with desired output format  -->
renderFormat is PDF, out refers to the pdf output 

            Fop fop = fopFactory.newFop(renderFormat, foUserAgent, out);

          

           // Setup JAXP using identity transformer

           TransformerFactory factory =
TransformerFactory.newInstance();

           Transformer transformer = factory.newTransformer(); //
identity transformer

          

           // Setup input stream

           Source src = new StreamSource(fo);

 

           // Resulting SAX events (the generated FO) must be piped
through to FOP

           Result res = new SAXResult(fop.getDefaultHandler());

          

           int startTime = (int)System.currentTimeMillis();

          

           // Start XSLT transformation and FOP processing

           transformer.transform(src, res);

          

           // Flush the BufferedOutputStream and then close it.

           out.flush();

           out.close();

 

 

Here are my findings after running:

 

1)       After server startup, the initial transactions are not that far
apart from those obtained using old FOP. However, as time progresses, I
do see the time for the same transactions increases. After about 15 such
iterations, the processing time almost doubles.

2)       I do see a lot of garbage collection happening in the new FOP.
The collection times are also very high. I am hereby attaching the
garbage collection stats for both the old and new FOP for about the same
number of transactions (refer to newFop_SL.stdout.txt and
oldFop_SL_stdout.txt). Also a thread dump for the server running new FOP
is provided (threadDump_newFop.txt).

3)       After using jmap and jhat to analyze the heap, I do see a lot
of objects consuming lot of memory in the new FOP. I am hereby providing
a spreadsheet containing Heap histograms for both the old and new FOP
for the same load (refer to HeapObjects.xls). Also, the jmap output for
the server using old and new FOP is provided (refer to oldFopMap.txt and
newFopMap.txt)

4)       Documents containing lots of Images are rendered amazingly fast
(about 85% improvement).

 

 

Based on this information, is there anything that we are doing that
might be resulting in this performance impact? Are there any other
options that we can use to make it perform better? Please let me know if
you need any additional information :-)

 

Thanks,

Kumar Puppala

 

 

 

 


Mime
View raw message