You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Willy Reinhardt <wr...@novell.com> on 2005/09/27 11:24:56 UTC

Rép. : Re: FOP improvement up to 3000%.

Hi,

I follow-up the discussion with interest and I also made a little test. 
So I use:
- Fop in command line with debug parameter version 0.20.5
- Xerces 2.6.2
or
- Crimson 1.1.3
- JDK 1.4.2
- fo file of 2.74 Mo (~50400 lines)
- OS Windows / CPU Intel 2.8GHz

I call for each parser 10 times the transformation results are:

Xerces:
135 ms/page
120 ms/page
119 ms/page
119 ms/page
117 ms/page
117 ms/page
116 ms/page
116 ms/page
117 ms/page
Average=120 ms/page

Crimson
114 ms/page
114 ms/page
114 ms/page
114 ms/page
114 ms/page
114 ms/page
114 ms/page
114 ms/page
114 ms/page
Average=114 ms/page

We can see Xerces optimize the transformation but the difference is only 5% faster for Crimson.

Willy

PS. To swap parser I change jar into endorsed directory of my JDK.


>>> dev@jeremias-maerki.ch  >>>
I share Jay's view here. It's unclear under which conditions the
measurements were taken.

I think it's difficult to tell which one is faster. I've found
benchmarks on the net which make Xerces the winner:
http://piccolo.sourceforge.net/bench.html
http://www.devsphere.com/xml/benchmark/summary.html#xml_parsers_xerces_versus_crimson

But there is also one by Sun which shows the opposite but never in the
area of factor 30. Since in the FOP use case only SAX parsing is
important, it could very well be that Crimson is faster. Validation may
influence the performance, too. Difficult to say.

Does anyone want to do a FOP benchmark with different combinations of
XML parser and XSLT processor and put that on the FOP Wiki? There are
lots of little aspects that influence the overall performance. I think that
would be cool. 

On 23.09.2005 16:55:43 JBryant wrote:
> 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" <ja...@intarex.com> 
> 09/23/2005 05:50 AM
> Please respond to
> fop-users@xmlgraphics.apache.org
> 
> 
> To
> <fo...@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
cs.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



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


Re: R?p. : Re: FOP improvement up to 3000%.

Posted by mcevikce <mc...@gmail.com>.
I have been trying to improve the performance of my PDF generation and been
unsuccessfull so far. From your stats I can see that you generate 2.74Mb fo
file in 130ms. Currently I am generating 1.4Mb fo file in 14-18 sec. This is
a huge difference. 
My file is a Table with 30 columns and 300 rows.
I am using JDK 1.5 with saxon.
There has to be something configured terribly wrong on my end to get such a
result response. Any idea what I might be doing wrong?
I can email the fo file if needed.
-- 
View this message in context: http://www.nabble.com/Rp.-%3A-Re%3A-FOP-improvement-up-to-3000-.-tf349841.html#a5085464
Sent from the FOP - Users forum at Nabble.com.


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