Re: Improving FOP Performance?

2005-02-12 Thread J.Pietschmann
Ram Krishnamoorthi wrote:
Currently, We are just invoking FOP command directly
from a Shell Script which would call the FOP Command
This means you have the overhead of starting a JVM process for
each individual invoice to process, including all the warm-up
costs. You should think about a custom Java program which
processes a larger batch of files, or about a server based
solution.
I would like to have your opinion on the Performance
that we observe here. The Test Machine we run FOP on
has 2 CPUs and 4 GB RAM. Our Production Machine that
we would be running FOP on soon has 4 CPUs though
There is an absolute limit on memory which a single JVM can manage.
Check the appropriate docs on how to set the memory limits for your
JVM. Optimize the settings in order to get most out of the available
physical RAM.
FOP uses a single thread for rendering a single PDF. You can only
take advantage of multiple CPUs by either running multiple JVMs in
parallel, or by using a custom Java program (command line or server)
which spawns multiple threads. For small input and output, and an
insignificant amount of images, FOP is processor bound rather than
I/O-bound. Including large, high resolution images or large user
font files (CJK) might turn FOP into an I/O-bound process. In any
case there shouldn't be much harm in starting a few more threads
than there are processors, unless you systematically run out of
JVM memory.
Tables take up more memory..do they Impact Performance
significantly?
Probably not. I'm not aware of a systematic study though.
(3) I am using xsl:for-each in 3-4 places in the
Stylesheet to loop through nodes with same Tag instead
of using 'Template Match'..does that matter? 
FOP doesn't execute the transformation, you use an XSLT processor
for this purpose, usually the XSLT processor in the Java run time
library. Generally, for all XSLT processor commonly in use currently,
xsl:for-each is as fast as using xsl:apply-templates, and it may
be faster by a tiny, unnoticeable amount. Depending on the structure
f the input XML and the complexity of the transformation, using
xsl:apply-templates may be recommended for better maintainability.
BTW xsl:for-each is *not* a loop in the same sense as in common
procedural programming languages.
 Caching a Stylesheet
Check the docs for javax.xml.transform.TransformerFactory.new Templates
and javax.xml.transform.TransformerFactory.Templates.new Transformer.
I doubt you'll notice much of an improvement unless your stylesheets
are somewhat complex and/or larger than a few hundred lines.
Are their other means to Improve Performance?
It depends where the bottleneck is. In your current setup, eliminating
the JVM startup cost is most likely what will get you the most bang for
the buck. System utilities like vmstat and iostat, some simple
instrumentation, or a more advanced profiling will show you where
possible problems hide.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Why is FOP not finding userconfig.xml on server ?

2005-02-12 Thread Manoj_Nair




I have code in the Applet as follows.

  URL userConfig = new URL(http, myserver, 7011,   /mypath/+
userconfig.xml);
  org.apache.fop.apps.Options options = new
org.apache.fop.apps.Options( userConfig.openStream());

myserver is running on a completely different machine. When this run in
the applet, FOP throws the following exception

org.apache.fop.apps.FOPException: can't find default configuration file
 at org.apache.fop.apps.Options.loadStandardConfiguration(Options.java:184)
at org.apache.fop.apps.Options.init(Options.java:73)
at org.apache.fop.apps.Options.init(Options.java:78)
at PrintApplet.callMeSucker(PrintApplet.java:168)


However when I run the server on my local machine and run the same code as
follows it works fine.

  URL userConfig = new URL(http, localhost, 7011,   /mypath/+
userconfig.xml);
  org.apache.fop.apps.Options options = new
org.apache.fop.apps.Options( userConfig.openStream());


I checked the link using the http://myserver:7011/mypath/userconfig.xml and
I could retrieve the file in IE.

Whats happening?

Thanks
Manoj



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



Re: Improving FOP Performance?

2005-02-12 Thread jeb501
Hi Ram,

Please post the codes / send me the sample code files (.fo,.xsl)
for us to study..

Thanks
Eugene



Ram Krishnamoorthi [EMAIL PROTECTED] 
11.02.2005 20:36
Please respond to
[EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Improving FOP Performance?






Hello,
We are using FOP to convert to generate PDF Invoices
for our Customers. We need to generate roughly around
25,000 Invoices Per Month and the Number would
increase each Month. We generate PDF Docs from XML
Input Files. We had Trial runs to check for
Performance and Memory usage.
Currently, We are just invoking FOP command directly
from a Shell Script which would call the FOP Command
repeatedly but making sure that not more than 2 (or
sometimes 3) FOP Processes are running at any instant.


I would like to have your opinion on the Performance
that we observe here. The Test Machine we run FOP on
has 2 CPUs and 4 GB RAM. Our Production Machine that
we would be running FOP on soon has 4 CPUs though

(1) In our case, An Invoice could have Several
Individual Sections. The Number of Sections could vary
from 10 to as high as 10,000 (depending on the data
present in the XML Input). On an Average, an Invoice
is around 10-20 Pages..while a small % of them exceed
500 Pages. Currently, We have a Page Sequence for 
each Section. We need to include only One Small Image
in each Invoice.

(2) There is a need to keep certain information
together in the same page, so I have used Tables
often..on an Average an Invoice could have around
50-60 Tables, But the Tables are not big (2 or 3 rows)
and have only one or 2 columns utmost. I do understand
Tables take up more memory..do they Impact Performance
significantly?

(3) I am using xsl:for-each in 3-4 places in the
Stylesheet to loop through nodes with same Tag instead
of using 'Template Match'..does that matter? 

At this Point, I see about 30,000 Pages being
generated in an Hour if I run 2 threads. I have not
embedded FOP in a Java Program Yet..Plan to do that..I
have seen 1 or 2 messages mentioning that Caching a
Stylesheet would help. Can someone share their
experience by doing that?

Are their other means to Improve Performance? 

Thanks for your assistance
Ram
 




 
__ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

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




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



Re: Improving FOP Performance? -

2005-02-12 Thread Markus Rietzler
this would also be my suggestion. at the moment we are also using fop as 
a command line script. when finishing the webapplication i will create a 
java servlet that runs under tomcat. first tests show a perfomance boost 
of 50%. mainly because the JVM must not be started every time, this 
overhead is being saved using tomcat and fop as java-servlet.

hope to see a few more suggestions...
markus
-Jesiolowski, Dominik [EMAIL PROTECTED] wrote: -
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
From: Jesiolowski, Dominik [EMAIL PROTECTED]
Date: 02/11/2005 07:13AM
Subject: RE: [***SPAM***] - Improving FOP Performance? - Bayesian Filter 
d etected spam

  Hello,
  We are using FOP to convert to generate PDF Invoices
  for our Customers. We need to generate roughly around
  25,000 Invoices Per Month and the Number would
  increase each Month. We generate PDF Docs from XML
  Input Files. We had Trial runs to check for
  Performance and Memory usage.
  Currently, We are just invoking FOP command directly
  from a Shell Script which would call the FOP Command
  repeatedly but making sure that not more than 2 (or
  sometimes 3) FOP Processes are running at any instant.
So you are starting, and stopping JVM, each time
you run fop. Consider writing java app that invokes
fop processing in a loop.
Regards
Dominik

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


Re: Why is FOP not finding userconfig.xml on server ?

2005-02-12 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:
myserver is running on a completely different machine. When this run in
the applet, FOP throws the following exception
org.apache.fop.apps.FOPException: can't find default configuration file
 at org.apache.fop.apps.Options.loadStandardConfiguration(Options.java:184)
FOP can't find the *default* config file, which is different from
the user config file. The default config file should be in the FOP
jar, as /conf/config.xml. Check the jar, and if the file is there,
as a Java security guru why the applet can't get it.
Several people reported in the past they successfully run FOP in
an applet.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Why is FOP not finding userconfig.xml on server ?

2005-02-12 Thread Manoj_Nair
Thanks for the reply.Last evening I did find the cause for this issue. I checked the source code and did found that FOP is initially loading standard configuration ( which is config.xml). I also found that the /cong/ directory is missing from the applet jar. But on my PC (localhost) the same directory /conf/ is present in the base directory where the applet gets loaded. So whats happening is when I access my local machine server the class loader doesnt find the /conf/config.xml file in the jar so it goes and tries to get it from the directory where the applet jar is loaded from.On my machine the /conf/ is present and FOP runs without exception.Now when I try to load the applet from the other server ( myserver which is a diff PC) FOP tries to do the same. It doesn find /conf/ in the applet jar so it tries to get it from the directory from where applet jar is present. This /conf/ directory is not present on the other PC and so it gives out an exceptionThis is what I assume is happening as I am to still test it out..ThanksManoj-"J.Pietschmann" [EMAIL PROTECTED] wrote: -To: [EMAIL PROTECTED]From: "J.Pietschmann" [EMAIL PROTECTED]Date: 02/12/2005 11:40AMSubject: Re: Why is FOP not finding userconfig.xml on server ?[EMAIL PROTECTED] wrote: "myserver" is running on a completely different machine. When this run in the applet, FOP throws the following exception  org.apache.fop.apps.FOPException: can't find default configuration file at org.apache.fop.apps.Options.loadStandardConfiguration(Options.java:184)FOP can't find the *default* config file, which is different fromthe user config file. The default config file should be in the FOPjar, as /conf/config.xml. Check the jar, and if the file is there,as a Java security guru why the applet can't get it.Several people reported in the past they successfully run FOP inan applet.J.Pietschmann-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]

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



Version from CVS building...

2005-02-12 Thread Tommy Reynolds
Does the current CVS version build on an FC3 system?  I've not had much 
luck using the tools and stuff from jpackage.org, so I was wondering how 
I could access the nightly builds.

Cheers!


pgpD8lyFtx07U.pgp
Description: PGP signature