Re: FOP performance - frustrating.. help!!
On Friday 27 December 2002 22:57, "Lee, Insoo" wrote: > [run] org.apache.xalan.xslt.Process -IN rates.xml -XSL rates_pdf.xsl -OUT > rates.fo > > this step took about 1 minute... You seem to use a seriously underpowered machine, or you've complicated the transformation too much. I routinely transform 1MB files on moderatly modern hardware in less than 10s. > Here is the lengthy my FO file... (only 1/3 of it.. since it's over 1MB) You should not send XML as mail content, it's mangled: > extent="0.5cm"/>u ence master-reference="anypage">
RE: FOP performance - frustrating.. help!!
I also have speed issues, but not this bad. One thing I do is put a block around the whole table that sets up my default font. Not sure if this will help you any, but it'll clean up the code a little. Also can you specify the font you want, like "Helvetica" instead of "Helvetica, Arial, sans". Just some little things that may help a little. ... ... ... Hope this helps, JPT |-+--> | | fop-dev-return-18504-jthaemlitz=oreillyauto.com@XML| | | .APACHE.ORG| | | | | | 12/27/02 03:57 PM | | | Please respond to fop-dev | | | | |-+--> >--| | | | To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> | | cc: | | Subject: RE: FOP performance - frustrating.. help!! | >--| nyamdweb03:/home/leeins/weblogic/myserver/public_html/fd/xml$java -cp /home/leeins/weblogic/3rd_party_jars_SUN/xalan.jar:$CLASSPATH org.apache.xalan.xslt.Process -IN rates.xml -XSL rates_pdf.xsl -OUT rates.fo this step took about 1 minute... Here is the lengthy my FO file... (only 1/3 of it.. since it's over 1MB) Could somebody shed some lights? What am I doing wrong? Apologies for the large/messy posting... (choose no-wrap to see it better...) Thanks much! http://www.w3.org/1999/XSL/Format ">Rates16 Oct 2002 to 16 Oct 2002 Created by RYDERS on 05/10/2002 at 20:55:2 (CT) Active EUR Funds Fund Date Daily Factor 1-Day Yield (365 Day Rate) Short Long 360 Day Rates 7-Day Current Yield 7-Day Effective Yield 30-Day Yield NAV1 (EUR) TBA ILA Federal Admin - 4139 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.10 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.11 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.12 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.13 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.14 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.15 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401. TBA ILA Federal Inst - 4129 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.10 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.11 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.12 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.13 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.14 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.15 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401. TBA ILA Federal Service - 4149 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.10 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.11 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.12 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.13 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.14 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.15 Dec 20020.23263000.840.84909950.837468000NA0.84.938401. TBA ILA Money Market Admin - 4109 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.10 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.11 Dec 2
RE: FOP performance - frustrating.. help!!
nyamdweb03:/home/leeins/weblogic/myserver/public_html/fd/xml$java -cp /home/leeins/weblogic/3rd_party_jars_SUN/xalan.jar:$CLASSPATH org.apache.xalan.xslt.Process -IN rates.xml -XSL rates_pdf.xsl -OUT rates.fo this step took about 1 minute... Here is the lengthy my FO file... (only 1/3 of it.. since it's over 1MB) Could somebody shed some lights? What am I doing wrong? Apologies for the large/messy posting... (choose no-wrap to see it better...) Thanks much! http://www.w3.org/1999/XSL/Format";>Rates16 Oct 2002 to 16 Oct 2002 Created by RYDERS on 05/10/2002 at 20:55:2 (CT) Active EUR Funds Fund Date Daily Factor 1-Day Yield (365 Day Rate) Short Long 360 Day Rates 7-Day Current Yield 7-Day Effective Yield 30-Day Yield NAV1 (EUR) TBA ILA Federal Admin - 4139 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.10 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.11 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.12 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.13 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.14 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401.15 Dec 20020.30112001.091.09908801.084032000NA1.090001.188401. TBA ILA Federal Inst - 4129 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.10 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.11 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.12 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.13 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.14 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401.15 Dec 20020.34222001.241.24910301.231992000NA1.240001.338401. TBA ILA Federal Service - 4149 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.10 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.11 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.12 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.13 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.14 Dec 20020.23263000.840.84909950.837468000NA0.84.938401.15 Dec 20020.23263000.840.84909950.837468000NA0.84.938401. TBA ILA Money Market Admin - 4109 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.10 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.11 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.12 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.13 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.14 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501.15 Dec 20020.28934001.051.05609101.041624000NA1.080001.205501. TBA ILA Money Market Service - 4119 Dec 20020.22085000.800.80610250.79506NA0.83.955501.10 Dec 20020.22085000.800.80610250.79506NA0.83.955501.11 Dec 20020.22085000.800.80610250.79506NA0.83.955501.12 Dec 20020.22085000.800.80610250.79506NA0.83.955501.13 Dec 20020.22085000.800.80610250.79506NA0.83.955501.14 Dec 20020.22085000.800.80610250.79506NA0.83.955501.15 Dec 20020.22085000.800.80610250.79506NA0.83.955501. TBA ILA Tax-Exempt California Admin - -Original Message- From: Arnd Beißner [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 3:53 PM To: [EMAIL PROTECTED] Subject: RE: FOP performance - frustrating.. help!! > Thanks for your reply... given XML and XSL, how would I generate FO so I can post it java -cp xalan-2.4.1.jar org.apache.xalan.xslt.Process -IN yourxml.xml -XSL yourxslt.xsl -OUT yoroutput.fo The classpath is just an example - use the name of your xalan.jar Arnd Beissner -- Cappelino Informa
Antwort: FOP performance - frustrating.. help!!
> It works well, but it works slow. > It takes about 5 minutes for 1,000 rows and this is only for transformer > translation (excluing any data query time or jdom XML building time) When you prepare an actual FO file for us to see, please check how long xalan takes for the xml->fo translation step. Just to make sure.. As for your XML file: you may want to try rewriting the elements below the node as attributes of the row node. Since you are generating the files on the fly, this should improve performance a little. With 1000 row elements, thats about 1 less nodes to process. If and how much this saves depends on the DOM and xslt processor you use, of course. In general, I find the 5 minutes you state a little long. FOP does have severe performance problemes with large tables, but not that bad. We generate a 30 page document of this kind in about 40 seconds on a 1Ghz Athlon. One thing that you could try is to increase the java heap to 1024MB. 512MB is not excessive for the kind of document you state. Maybe you don't get out of memory messages so far, but if memory is tight, the JVM will garbage collect a lot - and this is costly for FOP. Try to find a heap size where no garbage collection is necessary during processing of a single document. One other thing: If you generate PDFs that are costly in terms of CPU and/or memory, think about generating the PDFs in the background, then email them to your web site's visitors. If your use case could live with that, I'd go that route. Even with a FOP that's 20 times faster, you'll have a hard time guaranteeing a certain quality of service for your web site. At the very least, you'd have to use a rendering queue with a pool of renderers since you don't have infinite memory (I suppose). Hope this helps, Arnd Beissner -- Cappelino Informationstechnologie GmbH Arnd Beißner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP performance - frustrating.. help!!
> Thanks for your reply... given XML and XSL, how would I generate FO so I can post it java -cp xalan-2.4.1.jar org.apache.xalan.xslt.Process -IN yourxml.xml -XSL yourxslt.xsl -OUT yoroutput.fo The classpath is just an example - use the name of your xalan.jar Arnd Beissner -- Cappelino Informationstechnologie GmbH Arnd Beißner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: FOP performance - frustrating.. help!!
Title: FOP performance - frustrating.. help!! Thanks for your reply... given XML and XSL, how would I generate FO so I can post it Thanks -Original Message-From: Rhett Aultman [mailto:[EMAIL PROTECTED]]Sent: Friday, December 27, 2002 3:35 PMTo: [EMAIL PROTECTED]Subject: RE: FOP performance - frustrating.. help!! Really, what rows look like in XML is not helpful to us. What is helpful is seeing the FO, since FOP tranforms from the FO and not really from the XML. You may be using FO markup that's making the transformation and rendering costly, but we wouldn't be able to tell you for sure without seeing the FO. -Original Message-From: Lee, Insoo [mailto:[EMAIL PROTECTED]]Sent: Friday, December 27, 2002 3:34 PMTo: '[EMAIL PROTECTED]'Subject: FOP performance - frustrating.. help!! > Hello, I'm getting a little frustrated with FOP performance.> We are generating an XML on the fly that contains a few tables with> about 1,000 rows in total.> We passdown this XML along with XSL to the transformer to generate PDF> from our servlet.> (transformer.transform( inXML, new SAXResult(> driver.getContentHandler())); )> It works well, but it works slow.> It takes about 5 minutes for 1,000 rows and this is only for transformer> translation (excluing any data query time or jdom XML building time)> I read through past emails/FAQs and I think I tried them all and it> still does not improve the performance...>> Please help!!> > Here is what I have done.>> 1) run with more memory - yes I tried with 512MB (I don't get> OutOfMemory error)> 2) run in separate VM - only helps other requests coming to the site> 3) try with the latest FOP - I did - mine is fop-0.20.4> 4) try with the latest xalan.jar and xerces.jar - tried them, but no> improvement> 5) cache XSL style sheet - didn't really help...> 6) use multiple page-sequence - got it to work and I don't get> OutOfMemeory exception, but still performance didn't get better.> (even if I break them into multiple page-sequences, I will still> have to read through one row at a time, right? - that's why performance is> not really improving..)>> 7) no forward-reference - I don't have any page numbers> 8) try with new JDK - trying with JDK 1.3> 9) seralize servlet request - haven't done this, but I doubt this will> have any performance impact (I'm testing with one request for now)> 10) no images - I don't have any...> 11) Don't make the XML tree too deep - mine is very flat with 2 levels> deep.>> I have 1,000 rows and each row looks something like following in XML>> > 539> Some Fund> 0.376> NA> NA> NA> NA> 1.4> 1.58000> 1.> 09 Dec 2002> USD> I> > >> Here is the question:> Is this normal to take this long - 5 minutes - to produce a few tables> with combined total 1,000 rows (about 30 pages)?>> Any other better way?>> Thank you for your suggestions.>> Regards,> IL-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
RE: FOP performance - frustrating.. help!!
Title: FOP performance - frustrating.. help!! Really, what rows look like in XML is not helpful to us. What is helpful is seeing the FO, since FOP tranforms from the FO and not really from the XML. You may be using FO markup that's making the transformation and rendering costly, but we wouldn't be able to tell you for sure without seeing the FO. -Original Message-From: Lee, Insoo [mailto:[EMAIL PROTECTED]]Sent: Friday, December 27, 2002 3:34 PMTo: '[EMAIL PROTECTED]'Subject: FOP performance - frustrating.. help!! > Hello, I'm getting a little frustrated with FOP performance.> We are generating an XML on the fly that contains a few tables with> about 1,000 rows in total.> We passdown this XML along with XSL to the transformer to generate PDF> from our servlet.> (transformer.transform( inXML, new SAXResult(> driver.getContentHandler())); )> It works well, but it works slow.> It takes about 5 minutes for 1,000 rows and this is only for transformer> translation (excluing any data query time or jdom XML building time)> I read through past emails/FAQs and I think I tried them all and it> still does not improve the performance...>> Please help!!> > Here is what I have done.>> 1) run with more memory - yes I tried with 512MB (I don't get> OutOfMemory error)> 2) run in separate VM - only helps other requests coming to the site> 3) try with the latest FOP - I did - mine is fop-0.20.4> 4) try with the latest xalan.jar and xerces.jar - tried them, but no> improvement> 5) cache XSL style sheet - didn't really help...> 6) use multiple page-sequence - got it to work and I don't get> OutOfMemeory exception, but still performance didn't get better.> (even if I break them into multiple page-sequences, I will still> have to read through one row at a time, right? - that's why performance is> not really improving..)>> 7) no forward-reference - I don't have any page numbers> 8) try with new JDK - trying with JDK 1.3> 9) seralize servlet request - haven't done this, but I doubt this will> have any performance impact (I'm testing with one request for now)> 10) no images - I don't have any...> 11) Don't make the XML tree too deep - mine is very flat with 2 levels> deep.>> I have 1,000 rows and each row looks something like following in XML>> > 539> Some Fund> 0.376> NA> NA> NA> NA> 1.4> 1.58000> 1.> 09 Dec 2002> USD> I> > >> Here is the question:> Is this normal to take this long - 5 minutes - to produce a few tables> with combined total 1,000 rows (about 30 pages)?>> Any other better way?>> Thank you for your suggestions.>> Regards,> IL-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, email: [EMAIL PROTECTED]
FOP performance - frustrating.. help!!
> Hello, I'm getting a little frustrated with FOP performance. > We are generating an XML on the fly that contains a few tables with > about 1,000 rows in total. > We passdown this XML along with XSL to the transformer to generate PDF > from our servlet. > (transformer.transform( inXML, new SAXResult( > driver.getContentHandler())); ) > It works well, but it works slow. > It takes about 5 minutes for 1,000 rows and this is only for transformer > translation (excluing any data query time or jdom XML building time) > I read through past emails/FAQs and I think I tried them all and it > still does not improve the performance... > > Please help!! > > Here is what I have done. > > 1) run with more memory - yes I tried with 512MB (I don't get > OutOfMemory error) > 2) run in separate VM - only helps other requests coming to the site > 3) try with the latest FOP - I did - mine is fop-0.20.4 > 4) try with the latest xalan.jar and xerces.jar - tried them, but no > improvement > 5) cache XSL style sheet - didn't really help... > 6) use multiple page-sequence - got it to work and I don't get > OutOfMemeory exception, but still performance didn't get better. > (even if I break them into multiple page-sequences, I will still > have to read through one row at a time, right? - that's why performance is > not really improving..) > > 7) no forward-reference - I don't have any page numbers > 8) try with new JDK - trying with JDK 1.3 > 9) seralize servlet request - haven't done this, but I doubt this will > have any performance impact (I'm testing with one request for now) > 10) no images - I don't have any... > 11) Don't make the XML tree too deep - mine is very flat with 2 levels > deep. > > I have 1,000 rows and each row looks something like following in XML > > > 539 > Some Fund > 0.376 > NA > NA > NA > NA > 1.4 > 1.58000 > 1. > 09 Dec 2002 > USD > I > > > > Here is the question: > Is this normal to take this long - 5 minutes - to produce a few tables > with combined total 1,000 rows (about 30 pages)? > > Any other better way? > > Thank you for your suggestions. > > Regards, > IL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]