Re: Embedded XML->PDF performance vs CLI: Why so slow?

Alexios Giotis <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <[email protected]>
Hi Tory,

The execution time of ExampleXML2PDF.java & other examples in an IDE, is similar to the CLI version. Thus, there is no significant optimisation to do in the example code. I think this is due to running within a REPL but I have no Clojure skills to help you more on this. A profiler or frequent thread dumps should help locate where the time is consumed.  You could also execute the code 10 or more times in a loop and each time print the elapsed time to understand if the full minute is mostly a startup cost or a runtime cost. 


> On 27 Apr 2016, at 18:55, Tory S. Anderson <[email protected]> wrote:
> 
> This is also posted on SO[1], with the code. 
> Using XML and XSL, in less than a second the CLI program produces the desired PDF. My embedded program in Clojure, which follows the example code (ExampleXML2PDF.java)  closely, uses the same XML and XSL to produce the same PDF -- but it takes it around a full minute. I've tried sifting through the example code to find places optimizations occur, but I'm hoping someone here can help me know how to get around the tremendous time sink that seems to occur with my transformer.transform call. 
> Thanks,
> - Tory
> 
> Footnotes: [1] http://stackoverflow.com/questions/36802128/embedding-fop-xml-to-pdf-why-so-slow-vs-cli
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.