Performance Analysis (again :)

2011-08-23 Thread polymorphisme

Hello,

I'm trying the new intermediate format from the article 
Performance Analysis for Apache FOP's new Intermediate Format  of Jeremias
Märki.  
and his program
(http://www.jeremias-maerki.ch/download/fop/FOP%20Benchmarks.zip).
Thanks to Jeremias.

So, I have write a small file.xml and a file xml2fo.xsl for the
transformation xml -- fo.

When I do a test with the FOPBenchmark,
I obtain a duration of 0,39 seconds! in the results.xml (with the variant
from-it) :

  scenario name=xml2fo variant=from-if
descriptionApache FOP: file.xml example, rendering from Intermediate
  Format/description
environment  
  value name=java.specification.version1.6/value  
/environment
run idx=0
  run
value name=target-formatPDF/value
page-count2/page-count
duration390/duration
file mime=application/pdf;mode=painter
size=24294file:/C:/Users/greg/workspace/FOPBenchmarks/benchmarks/dev/05/file.if.pdf.if.if.pdf
/file
  /run
/run
  /scenario 

So, I take the class java bellow (for a program) :

public class Main {

public static void main(String[] args) {
 
 FopFactory fopFactory = FopFactory.newInstance();

try {
long startTime = System.nanoTime();  

File baseDir = new File(.);
File outDir = new File(out);
final File xmlfile = new File(baseDir, xml/file.xml);
File xsltfile = new File(baseDir, xsl/xml2fo.xsl);
File iffile = new File(outDir, file.if.xml);
File stampxsltfile = new File(baseDir, xsl/ifstamp.xsl);
File pdffile = new File(outDir, file.if.pdf); 
   
 
Main app = new Main();

// Setup output
OutputStream out = new java.io.FileOutputStream(pdffile);
out = new java.io.BufferedOutputStream(out);
   
try {
FOUserAgent userAgent = fopFactory.newFOUserAgent();

String mime = MimeConstants.MIME_PDF;
IFDocumentHandler targetHandler =
fopFactory.getRendererFactory().createDocumentHandler(
userAgent, mime);

IFUtil.setupFonts(targetHandler);
targetHandler.setResult(new StreamResult(pdffile));

IFParser parser = new IFParser();

Source src = new StreamSource(iffile);
Source xslt = new StreamSource(stampxsltfile);
 
TransformerFactory tFactory =
TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(xslt);
  

SAXResult res = new
SAXResult(parser.getContentHandler(targetHandler, userAgent));

transformer.transform(src, res);
} finally {
out.close();
}
   
long estimatedTime = System.nanoTime() - startTime;  
System.out.println(estimatedTime :  + estimatedTime + \n);
 
} catch (Exception e) {
e.printStackTrace(System.err);
System.exit(-1);
}
}
} 

I can obtain a file.if.pdf (2 pages), but the transformation take 2.4
seconds !
 I think it's very a long duration when I see duration390/duration in my
results.xml !

Do you know why when I use a class java the duration is very long ?
What can I do for obtain a more small duration ?

Thank.
-- 
View this message in context: 
http://old.nabble.com/Performance-Analysis-%28again-%3A%29-tp32317432p32317432.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Arabic fonts r-L

2011-08-23 Thread Theresa Jayne Forster
Hi all, 

 

Just looking for information on the current status of compliance for Arabic
fonts, I know there is a side fork dealing with this but I have not seen any
update recently.

In particular 

1.   Has the R-L columns been completed?

2.   Have the R-L numbering been complete?

 

Thanks

 

Kindest regards

 


Theresa Forster

Senior Software Developer



 



Re: Building fop from source on debian

2011-08-23 Thread Mathieu Malaterre
Hi Simon,

  Thanks for taking the time to answer my question.

On Mon, Aug 22, 2011 at 8:31 PM, Simon Pepping spepp...@leverkruid.eu wrote:
 This should not happen. I looks like an error in the order of the
 build targets. How did you run the build? Which ant version and which
 java in which version are you using?

ant is version 1.8.2-3 (debian)
java is:
java version 1.6.0_18
OpenJDK Runtime Environment (IcedTea6 1.8.7) (6b18-1.8.7-2~squeeze1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

We are only building the following two targets:
DEB_ANT_BUILD_TARGET := package javadocs

And the classpath is set to (during build):

DEB_JARS := $(ANT_HOME)/lib/ant-trax.jar batik-all
xml-apis-ext batik-libs xml-apis avalon-framework xercesImpl
xmlParserAPIs xalan2 junit commons-io commons-logging
xmlgraphics-commons servlet-api-2.4 qdox

 Reported as:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638532

 Your build errors are not fop bugs, unless proven. No thanks.

This is what surprised me when I saw a Null pointer exception being
raised in the code. Starring at the code I could not understand if
this was part of the pre-condition or if there is an issue with the
code which does not support null pointer.


Thanks again,
-- 
Mathieu

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



Re: Arabic fonts r-L

2011-08-23 Thread Glenn Adams
R-L columns are still outstanding.

What do you mean by R-L numbering?

Regards, Glenn

On Tue, Aug 23, 2011 at 3:52 AM, Theresa Jayne Forster 
ther...@inbrand.co.uk wrote:

 Hi all, 

 ** **

 Just looking for information on the current status of compliance for Arabic
 fonts, I know there is a side fork dealing with this but I have not seen any
 update recently.

 In particular 

 **1.   **Has the R-L columns been completed?

 **2.   **Have the R-L numbering been complete?

 ** **

 Thanks

 ** **

 Kindest regards

 ** **


 Theresa Forster

 Senior Software Developer

 

 ** **