Thank you for running the file. There is a huge difference between your
result 6.1 sec and mine 27 sec.
It would be awsome if I can get this to run on 6.1 sec.

Are you testing this from a command line using fop.bat? Can you tell me
which libraries are you using? Also any other information about the
environment you running will help. Here is my environment:

- jdk1.5.0_06
- Saxon 8.6
- Crimson
- I got the FOP trunk about 2 weeks ago. 
- Running a webapp on JBoss 4.02.
- Servlet is making the call. Here is the code that makes the call. I belive
this is similar to what Fop.bat does.

private void transform(HttpServletRequest a_req, HttpServletResponse a_res,
                        String a_html) throws Exception {
                TransformerFactory tfactory = 
TransformerFactoryImpl.newInstance();
                Transformer transformer = tfactory.newTransformer();
                SAXParserFactory factory = SAXParserFactory.newInstance();
                factory.setValidating(false);
                factory.setNamespaceAware(false);
                //BufferedOutputStream buffOutput = null;
                ByteArrayOutputStream arrayOutput = null;
                try {
                        
                        if (System.getProperty("debug_mode") != null
                                        && 
System.getProperty("debug_mode").trim().equals("true")) {
                                Log.info(a_html);
                        }
                        
                        StopWatch.setThreadEvent("PDF-transform-start1");
                        a_res.reset();
        
                        ByteArrayInputStream arrayInputStream = new 
ByteArrayInputStream(
                                        a_html.getBytes());
                        BufferedInputStream buffInput = new BufferedInputStream(
                                        arrayInputStream, 1024 * 1500);
             
                        //buffOutput = new 
BufferedOutputStream(a_res.getOutputStream());
                        arrayOutput = new ByteArrayOutputStream();
                        //buffOutput = new BufferedOutputStream(arrayOutput);
                        

                        Map parameters = new HashMap();
                        String pagewith = (String) 
a_req.getSession().getAttribute(
                                        "pagewitdh");
                        if (pagewith == null || pagewith.trim().equals("")) {
                                Log.info("PDF will be generated with default 
page with of 2000px");
                                pagewith = "2000";
                        }
                        parameters.put("pagewidth", pagewith + "px");
                        XMLReader parser = 
factory.newSAXParser().getXMLReader();
                        XMLFilter filter = new CSSToXSLFOFilter(null, null, 
parameters, parser);
                        
                        //Setup FOP
                        FopFactory fopFactory = FopFactory.newInstance();
                        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
arrayOutput);
                        //Make sure the XSL transformation's result is piped 
through to FOP
                        Result res = new SAXResult(fop.getDefaultHandler());
                        
                        Source src = new SAXSource(filter,new 
InputSource(buffInput));
                        
                        
StopWatch.setThreadEvent("PDF-transform-end-initialize1");
                        transformer.transform(src, res);     
                        StopWatch.setThreadEvent("PDF-transform-end-convert1");
                        
                        a_res.setContentType("application/pdf");
                        a_res.setContentLength(arrayOutput.size());

                        // Send content to Browser
                        
a_res.getOutputStream().write(arrayOutput.toByteArray());
                        // Send content to Browser
                        StopWatch.setThreadEvent("PDF-transform-end-write1");
                        a_res.getOutputStream().flush();
                        //buffOutput.flush();
                        StopWatch.setThreadEvent("PDF-transform-end-flush1");
                        
                } catch (Exception e) {
                        e.printStackTrace(System.err);
                } finally {    
                        arrayOutput.close();   
                }
                
                
        }


-- 
View this message in context: 
http://www.nabble.com/Performance-with-large-Tables-tf1858493.html#a5120795
Sent from the FOP - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to