xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JBry...@s-s-t.com
Subject RE: FOP improvement up to 3000%.
Date Fri, 23 Sep 2005 15:19:42 GMT
No offense meant. I've seen lots of messages about performance differences 
when the test conditions were largely responsible.

In this case, I suggest making more memory available to Xerces. Perhaps 
Xerces makes less efficient use of memory than Crimson. Of course, if 
memory is a sensitive issue, perhaps you should just use Crimson. For that 
matter, even if Xerces does approach the performance of Crimson when you 
give Xerces more memory, why not use Crimson (assuming you get the output 
you want)?

Fourteen months ago, I wanted to use XSLT 2.0, so I went to Saxon as the 
XSLT processor for FOP. So long as you are willing to prepare the FO file 
with other tools, you do not need to use the tools shipped with FOP.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)





"Xaus, Jaume" <jaume.xaus@intarex.com> 
09/23/2005 10:03 AM
Please respond to
fop-users@xmlgraphics.apache.org


To
<fop-users@xmlgraphics.apache.org>
cc

Subject
RE: FOP improvement up to 3000%.






Dear Jay,

We expended a lot of time in many test about this two libraries. :-)

Two test was performed in the exactily same conditions.

This is the code used in test :

public class TestFop {
  public TestFop() {
    String[] clo = {"-d", "-pdf", "/test/prova.pdf", "-xml", 
"/test/per.xml", "-xsl","/test/ReportGeneric.xsl"};

    try {
      long heapSize = Runtime.getRuntime().totalMemory();
      long heapMaxSize = Runtime.getRuntime().maxMemory();
      long heapFreeSize = Runtime.getRuntime().freeMemory();
      Date ini = new Date();
      System.out.println("Tamany heap : "+heapSize);
      System.out.println("Maxim heap : "+heapMaxSize);
      System.out.println("LLiure heap : "+heapFreeSize);

      Fop.main(clo);

      heapSize = Runtime.getRuntime().totalMemory();
      heapMaxSize = Runtime.getRuntime().maxMemory();
      heapFreeSize = Runtime.getRuntime().freeMemory();
      System.out.println("Tamany heap : "+heapSize);
      System.out.println("Maxim heap : "+heapMaxSize);
      System.out.println("LLiure heap : "+heapFreeSize);
      Date fin = new Date();
      long sec = (fin.getTime()-ini.getTime())/1000;
      String hola = "Temps = "+sec+" segonds.";
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }

  public static void main(String[] args) {
    TestFop testfop = new TestFop();
  }

Parametres JVM : -Xms128m -Xmx512m
Size of file per.xml : 501 kb
Lines of file per.xml : about 4.000 lines
Pages generated in file prova.pdf : 117 pages

Time with Xerces  : 1637 seconds
Time with Crimson : 66 seconds

Everybody could test yourself if he would !

Salutations

 

-----Mensaje original-----
De: JBryant@s-s-t.com [mailto:JBryant@s-s-t.com] 
Enviado el: viernes, 23 de septiembre de 2005 16:56
Para: fop-users@xmlgraphics.apache.org
Asunto: Re: FOP improvement up to 3000%.

Were the conditions of the two runs exactly the same? For example, if you 
were timing the first run of the Xerces parser and the second run of the 
Crimson parser, caching could account for much of the difference.

Also, such items as configuration differences can have a large impact. If 
you were using the default amount of memory, perhaps Xerces would benefit 
from a change in that setting while Crimson may be more efficient in its 
use of memory and not suffer from using the default. Thus, changing 
configuration could account for at least some of the difference. Your 
mention that "This library give very poor performance where xml file is 
large" makes me think memory may be part of the difference.

I'm sure other issues could factor into it as well.

Of course, Crimson may simply be a much faster parser. I have heard good 
things about Crimson from a number of quarters.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)





"Xaus, Jaume" <jaume.xaus@intarex.com>
09/23/2005 05:50 AM
Please respond to
fop-users@xmlgraphics.apache.org


To
<fop-users@xmlgraphics.apache.org>
cc

Subject
FOP improvement up to 3000%.











 
Dear friends,
 
We are using FOP api in order to build PDF documents from large Xml files.
 
The FOP package distribution contains Xerces as xml parser. ([Debug] Using 

org.apache.xerces.parsers.SAXParser as SAX2 Parser)
 
This library give very poor performance where xml file is large.
 
We improved up to 3000% the performance simplement changin Xerces for 
Crimson library.([Debug] Using org.apache.crimson.parser.XMLReaderImpl as 
SAX2 Parser)
 
Does anyone know the reason off this performance difference ?
Thanks 
 



Jaume Xaus
Director Departament Java
jaume.xaus@intarex.com


“La confianza, como el arte, nunca proviene de tener todas las respuestas, 

sino de estar abierto a todas la preguntas.” 
Earl Gray Stevens.
 


 

 

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005


-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 22/09/2005
 

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



Mime
View raw message