Re: Fop With Java Web Start
On Thu, 2002-02-14 at 09:57, Jim Urban wrote: Has anyone used FOP within a Java Web Start application? I've used FOP in an application. I've used Java Web Start. I have not put an FOP application in Java Web Start. I don't see any reason it couldn't be done, though. I need to produce formatted reports for browsing and printing in a JWS application. I'm sure I can use the AWT option to display the report. My concern is, will the print option of the AWT window work within the JWS environment? You will need to request the grant of permissions by the user. You can request that all-permissions be granted. But then you have to sign all the jars. With FOP, all the jars that are needed are distributed. So you don't have to search your CLASSPATH to find out which jars to include in your JNLP file. Also, does the AWT presentation use the old AWT objects or Swing objects? Swing. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Console printing
On Thu, 2002-02-14 at 14:37, Sami, Abdul (Netprosys) wrote: I am using Fop-0.20.1. to generate PDF. How can i stop FOP from printing console messages? fop.sh myfile.fo myfile.pdf /dev/null 21 Or i could redirect the messages to some file. Yes you could. Plus from which jar i could get org.apache.log.* classes. The code is given below: Let's take a look at the jar files included in the lib subdirectory: = [weiqi@gao-2001 xml-fop]$ ls lib | more CVS ant.jar batik.jar bin bsf.jar buildtools.jar jimi-1.0.jar jimi-License.txt logkit-1.0.jar readme stylebook.jar xalan-2.2D11.jar xerces-1.4.3.jar = Anybody want to make a guess which of these jar files contain the org.apache.log.* classes? It's not in ant.jar. I just opened it in notepad, and did a search for org.apache.log. It's not in that file! :=) -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Surprising XEP vs. FOP benchmarking results
When we compared FOP and XEP in June last year, both are using roughly the same amount of memory and took the same amount of time (roughly). We had thought, Here's a commercial product, maybe it's faster and use less memory. We were wrong. XEP does generate nicer outputs and supports more of the elements in the XSL recommendation. -- Weiqi Gao [EMAIL PROTECTED] -Original Message- From: Savino, Matt C [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:32 PM To: '[EMAIL PROTECTED]' Subject: Surprising XEP vs. FOP benchmarking results 160k FO file - 3 page PDF document: FOP - 1.9 sec. XEP - 51 sec. Wow. I've attached the FO file. Has anyone else seen this kind of perfromance gap? Or am I doing something wrong? FYI - I'm using the standard out of the box batch file to run it. In the FO, I had to change master-name to master-reference in the page-sequence. Also XEP doesn't like blank table-cells, I had to fill them with empty block elements But those were the only two things I had to change. I'm going to email RenderX and see if they have any response. If it's something in my FO that's still a little scary. I've never seen FOP slow down like that based on something in the FO. Just thought you developers might be interested in this. I'm on the fop-user list finally, and I'll be bugging them for all my user-related inquiries in the future. I do like XEP's output. Easy to debug FO problems. By the way, most of the time was taken up outputting the individual the pages on the line that starts (sequence one (flow..., if that means anythig to you developers. C:\xeprun ReportOutput.fo (document [input ReportOutput.fo] [output ReportOutput.pdf] (S (parse [system-id file:/C:/xep/ReportOutput.fo])) (I (masters )(sequences (sequence [master-reference one](static-content [flow-name xsl-region-before])(static-content [flow-name xsl-region-after])(flow [flow-n ame xsl-region-body] (F (BkMaker (sequence one (flow [page-number 1][page-number 2][page-number 3]) (static-content [page-number 1][page-number 2][page-number 3]) ))) (T (SAX [page-number 1][page-number 2][page-number 3])) ) done Keep up the good work! Matt Savino ReportOutput.zip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: [vote] Merging JFor with FOP
On Thu, 2001-10-18 at 15:42, Enrico Schnepel wrote: I am not a committer but here is my unofficial vote: +1 It's a great advantage for everyone. I'm not a committer. I'm just a user of FOP. I haven't heard of jfor before today. I urge FOP committers to examine the proposal to merge and vote yes only if the merge does not adversely affect the already strained performance of FOP in both space and time. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FO and Sockets.
On Wed, 2001-09-26 at 07:50, Hinrich.Boog wrote: [...] The communication works fine, the sending of the document and the transforming as well, I just have to put it together, which does not work: My client sends the stuff, the server starts transforming, but before the server is finished, the client shuts down. [...] You would have better luck asking this question in a Java programming mailing list or usenet group. comp.lang.java.programmer maybe? The O'Reilly Java I/O book contains a chapter (I think) on Socket programming. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FAQ: Where's the Windows zip file for Fop?
On 28 Aug 2001 15:55:38 +1000, Peter B. West wrote: How about a Fop-0.20.1-bin.zip.txt, explaining how to unzip a tar.gz? It might reduce the F of this AQ. Q: Why isn't there a Windows .zip version of Fop on the download site? A: To save diskspace on the Fop download site. This is practical for two reasons: 1. For a Java project, the zip archive and the tar.gz archive would contain exactly the same content. So one of the two is superfluous if each format can be unarchived on every platform that mattered. 2. It is indeed the case that each format can be unarchived on every platform that mattered. One can easily unzip an zip archive on Linux, thanks to the GNU zip/unzip programs. One can also gunzip and untar a tar.gz archive on Windows, thanks to the GNU tar program and Cygwin (or WinZip, or even PKZIP, if one is so inclined). Since tar.gz archives is always smaller than zip archives, (at least for archives the size of the Fop project), it is natural to choose tar.gz as the only archive format on the Fop download site. This format causes little to no problems for the various UNIX platforms. Some UNIX flavor's tar command is incompatible with the GNU tar command for pathnames longer than 100 characters. The problem is easily remedied by downloading GNU tar from http://www.gnu.org/software/tar . For Windows NT/2000/etc. platforms, just drag the tar.gz archive and drop it into the WinZip (http://www.winzip.com, $29) or PKZIP for Windows (http://www.pkware.com, $29) window. A better solution would be to download the free software Cygwin (http://cygwin.com) and get the GNU tar program as part of the suite. Cygwin is free software in the genuine FSF sense. The suite you download will include not only GNU tar, but also many of the other GNU utilities (bash, gcc, etc.). The command line syntax of GNU tar is very similar the the JDK's jar command. To unarchive Fop-0.20.1-bin.tar.gz, for example, one runs: tar zxvf Fop-0.20.1-bin.tar.gz [I don't use MacOS, but surely there must be a port of GNU tar for it, right?] (Until this is either added to the web site, or the FAQ, we can always point to the mail archive for new zip archive queries.) -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FAQ: Where's the Windows zip file for Fop?
On 29 Aug 2001 13:31:09 +1000, Mark Lillywhite wrote: Why not stick the whole distro into a JAR file? Everyone has jar, don't they? (and aren't JAR and ZIP files compatible with each other?). Maybe this is a dumb idea but it seems a bit silly to have platform wars when there's a Java standard for archiving. I'm not really sure why we don't see this used in more places, but maybe that's why it's a dumb idea :) It's not platform war anymore as any one of the formats can be unarchived in any one of the platforms of interest. It's a compression war. And tar.gz wins for now because its file size is smaller than zip (and its equivalent, jar). A few other projects are starting to use tar.bz2 format already because bzip2 compresses even more and bunzip2 is readily available for all platforms. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
A better shell script for running FOP
Hi, I have adapted the shell script that Ant uses to run itself into a shell script that can be used to run FOP. I have attached the 'fop' script. This can potentially be a nice replacement for the fop.sh script that FOP currently uses. Benefit of this script: 1. For users of FOP that uses it as a command line utility, as in fop -fo myfile.fo -pdf myfile.pdf there is no need to mess around with the CLASSPATH. Simply add /path/to/FOP-0.20.1 into the PATH, or create a symbolic like this: ln -s /path/to/Fop-0.20.1/fop /usr/bin/fop and the fop command will simply work. 2. The ant script works with Cygwin, even if you install FOP into a directory with a space in its name, like C:\Program Files. I haven't tested it but it should work. 3. It brings in all jar files in the $FOP_HOME/lib directory. So in the future, there's no need to modify the fop script when some new library is added to $FOP_HOME/lib. -- Weiqi Gao [EMAIL PROTECTED] #! /bin/sh # # Shell script to run FOP, adapted from the Jakarta-Ant project. if [ -f $HOME/.foprc ] ; then . $HOME/.foprc fi # OS specific support. $var _must_ be set to either true or false. cygwin=false; darwin=false; case `uname` in CYGWIN*) cygwin=true ;; Darwin*) darwin=true ;; esac if [ -z $FOP_HOME ] ; then # try to find FOP if [ -d /opt/fop ] ; then FOP_HOME=/opt/fop fi if [ -d ${HOME}/opt/fop ] ; then FOP_HOME=${HOME}/opt/fop fi ## resolve links - $0 may be a link to fop's home PRG=$0 progname=`basename $0` while [ -h $PRG ] ; do ls=`ls -ld $PRG` link=`expr $ls : '.*- \(.*\)$'` if expr $link : '.*/.*' /dev/null; then PRG=$link else PRG=`dirname $PRG`/$link fi done FOP_HOME=`dirname $PRG` fi # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin ; then [ -n $FOP_HOME ] FOP_HOME=`cygpath --unix $FOP_HOME` [ -n $JAVA_HOME ] JAVA_HOME=`cygpath --unix $JAVA_HOME` [ -n $CLASSPATH ] CLASSPATH=`cygpath --path --unix $CLASSPATH` fi if [ -z $JAVACMD ] ; then if [ -n $JAVA_HOME ] ; then if [ -x $JAVA_HOME/jre/sh/java ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD=$JAVA_HOME/jre/sh/java else JAVACMD=$JAVA_HOME/bin/java fi else JAVACMD=java fi fi if [ ! -x $JAVACMD ] ; then echo Error: JAVA_HOME is not defined correctly. echo We cannot execute $JAVACMD exit fi if [ -n $CLASSPATH ] ; then LOCALCLASSPATH=$CLASSPATH fi # add fop.jar, which resides in $FOP_HOME/build LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:$LOCALCLASSPATH # add in the dependency .jar files, which reside in $FOP_HOME/lib DIRLIBS=${FOP_HOME}/lib/*.jar for i in ${DIRLIBS} do # if the directory is empty, then it will return the input string # this is stupid, so case for it if [ $i != ${DIRLIBS} ] ; then if [ -z $LOCALCLASSPATH ] ; then LOCALCLASSPATH=$i else LOCALCLASSPATH=$i:$LOCALCLASSPATH fi fi done # For Cygwin, switch paths to Windows format before running java if $cygwin; then FOP_HOME=`cygpath --path --windows $FOP_HOME` JAVA_HOME=`cygpath --path --windows $JAVA_HOME` LOCALCLASSPATH=`cygpath --path --windows $LOCALCLASSPATH` fi $JAVACMD -classpath $LOCALCLASSPATH $FOP_OPTS org.apache.fop.apps.Fop $@ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Release Process Improvements, Versioning etc
On 13 Aug 2001 22:08:50 +, Arved Sandstrom wrote: I invite everyone to submit ideas as to how we can improve the release process: versioning, builds and testing. It seems like almost everytime a 0.X.0 release comes out, there is almost instantaneously a showstopper bug that necessitates a 0.X.1 release, as happened this time. If making a release reveals bugs, then there should be more releases. Release early, release often is one of the tenets of Open Source. I don't want to dictate how things would work - we have a lot of good developers here who do configuration management, source control and testing in real life just as I do - but here are a few obvious ideas. 1) Believe it or not I can actually guarantee to do builds on a given date, now that I have a system for doing the CHANGES file rather rapidly. So once we have decided on a given date for a release, I suggest that we mandate a code freeze starting N days before the release. At the start of the freeze I build a pre-release distro, and it will be labelled as a pre-release (PR suffix maybe?) During those N days (2 days, 3 days?) everyone will have an opportunity to test the release, and find those bad bugs that somehow never showed up before. That sounds like a very good idea. And I have seen other Apache projects doing it. (Except that they are not calling it PR. This is another instance where Apache management should probably dictate all sub projects to use a uniform name for the pre-releases.) 2) More comprehensive build tests. I am not so much concerned with how the PDF looks as just making sure we get no exceptions. Petr Andrs' font embedding examples, if used as build tests, would have caught a bad bug, for example. This testing is complementary to the testing Keiron Liddle has laid the groundwork for, which is oriented towards conformance testing. I have not used the testing framework. I tried ./build.sh test once and it threw me some error message. It would be benefitial if the testing frame work can be made to work in a way similar to the make; make check sequence for GNU projects. That way more people would run the test. Make it a rule that absolutely nothing will be committed without clearing all the tests. If feasible, solicit donations to the test case .fo files directory from other applications, authors of XML books, the W3C recommendation authors, and FOP users in general. The idea is to build a formidable set of real world examples of .fo files, and .xml/.xslt files so as to 1) test FOP, and 2) show case FOP's capabilities. Wouldn't it be nice if after building and testing FOP from a source download, the user gets a subset of the W3C XSL 1.0 Recommendation (or a section of the DocBook Definitive Guide, or Chapter 17 of the XML Bible) in PDF format ready to be viewed, searched, and printed. 3) Versioning and build numbers: I hate putting up FOP-0.20.0, and 24 hours later putting up FOP-0.20.1, just for a bug fix. Granted, it was an important defect, and needed to be addressed right away, but I don't think it rates that kind of revision increment. I don't have any good suggestions (I know how I do things at work, but that's different). Any thoughts? 0.20.1 is fine. I don't have any issues with it. If another bug was found and fixed tomorrow, I would be glad to use a 0.20.2. As it is right now, I don't think that we are making a full use of the third number anyway. I am sure there is other stuff also. My goal here is to develop a formal process document that describes exactly what I do, so that anyone with commit privileges can easily duplicate the complete release process. A pre-release communication with other Open Source projects, like Cocoon2, about API changes and other changes that may potentially impact them is also critical. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[Patch] ./build.sh distclean should delete *.tar.gz and *..zipfiles from all versions
Hi, The attached patch will allow ./build.sh distclean to delete not only the *.tar.gz and *.zip files of the current version, but also the *.tar.gz and *.zip files from earlier versions. Also the delete command for *.tar is not needed. -- Weiqi Gao [EMAIL PROTECTED] 2001-08-12 Weiqi Gao [EMAIL PROTECTED] * Modified distclean target in build.xml to delete all versions of tar.gz and zip archives, not only the current version. Removed the delete command for tar archives as they are not needed. Index: build.xml === RCS file: /home/cvspublic/xml-fop/build.xml,v retrieving revision 1.38 diff -u -r1.38 build.xml --- build.xml 2001/08/12 17:37:25 1.38 +++ build.xml 2001/08/12 21:02:19 @@ -684,9 +684,8 @@ delete dir=${dist.src.dir}/ delete dir=${dist.bin.dir}/ delete - fileset dir=${basedir} includes=${Name}-${version}*.tar.gz/ - fileset dir=${basedir} includes=${Name}-${version}*.tar/ - fileset dir=${basedir} includes=${Name}-${version}*.zip/ + fileset dir=${basedir} includes=${Name}-*.tar.gz/ + fileset dir=${basedir} includes=${Name}-*.zip/ /delete /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Release Schedule
Arved Sandstrom wrote: At 09:46 PM 8/9/01 -0500, Weiqi Gao wrote: This makes sense. People who are getting the source release can build the Javadocs from the release. People who are getting the binary release can't build the Java docs, so they need the Javadocs bundled in. Weiqi, I assume you meant that what makes sense is neither what I suggested nor what Charlie suggested, but rather, prepared Javadoc with the binary distro, and none with the source. I pretty much assume that the complete set of batch files will be identical acrosss different distros. Of course this is assuming that the Javadoc is going to be useful for the customers of the binary distribution. I want to make it clear that the Javadoc is not going to help someone all that much in figuring out how to make FOP run. We are talking about the API docs when I say Javadoc, _not_ the regular HTML documentation. I have to admit that during the past few months of trying to use FOP I have never looked at the Javadoc. The HTML documentation has been adequate. However I'm just one user. There might be other users whose experience says otherwise. When I said Javadoc in binary distribution, what I had in mind are things that I can download from Sun's website, like JAXP 1.1, JSSE, JNDI, etc. They've always included the Javadocs. But they distribute only the public API Javadocs (the javax.naming.*, etc., part, not the com.sun.naming.*, etc., part). I don't know how FOP can fit into that model. Maybe when the public API is separated from the implementation details, FOP can provide Javadocs only for the public API and not the implemenation details, thus cutting down the size of the distribution. Until then, go with your instinct. Incidentally, none of this is an issue for me. I have a fast machine and I have a cable connection. If all potential users also have cable or ADSL connections then it's a moot point. But they don't, so distro size (I would think) is a consideration. Speaking as one with a 28.8k modem behind an unlimited hours ISP, I don't really care about the size either. (I downloaded my GNOME 1.4 as well as the .NET SDK over the phone line. It took only a couple of DAYS.) -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Public API Change in Driver (Was Re: [GUMP] Build Failure - Cocoon2)
Sam Ruby wrote: It appears that some fop interfaces are changing in a way that will impact cocoon2... is there work underway to keep these projects in synch? In particular, is there another backwards compatible set of interfaces that cocoon2 should be using during the transistion? This is probably introduced by Mark's patch. I have reported this in my report when I tested the patch before the commit (See the thread FOP in a servlet under load). Mark mentioned it in his web site for the patch too. The documentation (Embedding) should probably be updated by the committers to reflect the change. I don't think a backwards compatible interface is needed. Not for something with a version number of 0.19.0, and been characterized as pre-beta, not-production-ready and incomplete. (If that doesn't buy the project the rights to change the public interface at will, we might as well call it version 1.0). -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Performance Problems - More Findings
On 25 Jul 2001 16:44:47 +1000, Darren Munt wrote: As an interim measure, we decided to produce the FO file separately with another parser (I wont tell you which one, it will only make you cross) We'll make wild guesses and get cross anyway. You are using MSXML, right? :) [No need to answer.] and send this straight to FOP. This brought the total rendering time down from 30 seconds to about 17 seconds, which exceeds the saving observed by Weiqi earlier when using Saxon. I realize that the time that is spent in XSLT vs. in XSL-FO is dependent on the complexity of the original XML, of the XSLT stylesheet, and of the resulting FO. I could imagine a very simple XSLT working on a very simple XML to generate a fairly complicated FO, as is the case for the AllElements example. Or it could be the other way around. These could change the proportions of the time wildly. If you spend significant time in XSLT, then using a faster transformer makes sense. Unfortunately, there is no faster XSL-FO transformers that we can substitute FOP with (the eval version of The Other FO processor---I don't want to mention names to make you cross either---seems to be even slower than FOP at certain inputs). One thing I tested early on was to interface the XSLT results into FOP in various ways: Stream, SAX, and DOM. And there doesn't seem to be any time savings I can wring out by using a DOM vs. an in memory string wrapped up in a InputSource. FOP parses whatever that's input again anyway. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP in a servlet under load
On 18 Jul 2001 23:02:26 -0500, Weiqi Gao wrote: Following suggestions from another post in the thread, we tried Saxon in place of Xalan, and achieved noticeable speedups. And yes, Saxon is picky! I'll share some numbers later. Just a quick followup, by switching to Saxon we were able to reduce the processing time by around 30%. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP jar and patches available
On 20 Jul 2001 15:59:45 +1000, Mark Lillywhite wrote: I've finally managed to post my diffs, JARs, tars and output samples, along with a fairly lengthy explanation of what I've done, to the web. This includes a PDF bug fix so that Acrobat should work again, now. Check it all out at: http://www.inomial.com/fop Thanks for post this. Let me know if any links are dead or you have any problems. Instructions to applying the patch are on the web pages. I was able to apply the patches successfully against the then current CVS tree 8 hours after Marks post, Friday morning US Centrol (UTC -500) time. The build is clean. The source and JARs are against the current CVS, updated only minutes before I sent this email. Note that I use Unix (Linux) so I don't know how patch/diffs/cvs/etc work on That Other Operating System. Feedback is definitely welcome, updates and patches etc likewise. All modified files are commented. Here's how it affected my use case: 1. The API is changed a little bit. The changes required in user code is clearly documented in the web page. 2. The processing speed is roughly the same for the AllElements sample from Chapter 15. 3. The memory consumption is also roughly the same. This is because I'm processing the same three page document in many threads, and not one long document in a single thread. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP in a servlet under load
On 19 Jul 2001 15:07:31 +1000, Mark Lillywhite wrote: handle concurrent requests. I simply cannot queue up all the requests and process then one at a time. Why not? It would be pretty easy to make a queue up that processes FOP objects serially, blocking the servlet thread until the requested object is formatted. With a centralised Queue you could then select the number of FOP processors that are processing the entries on the queue. I have a nice multithreaded Queue implementation that allows multiple servers on a single queue with multiple submitters - it doesn't block the enqueue caller, but that wouldn't be too difficult. That way you can have the right number of threads for the number of CPUs you have, and you should get better overall performance and much less memory usage. Sure, the servlet thread(s) will block waiting for processing, but that's what happens anyway, right? I agree with you here. I'm in favor of using a thread pool to regulate the FOP processing but that violates our 'guidelines and best practices' of not to use threads in user code. This is to make the poor guy who replaced Weiqi have an easier life maintaining the code. I also have the code to queue up requests, inspired by Allan Holub's articles, and later a book, on Threading in JavaWorld. It uses the Active Object pattern, which is described in Doug Schmidt's book on Pattern Oriented Software Architecture II (http://www.cs.wustl.edu/~schmidt/). -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP in a servlet under load
We did some playing around with a simple FOP servlet that does XHTML-XSL-FO-PDF using Xalan and FOP and come away with the following findings: 1. It uses quite a bit of memory. While running around 20-30 concurrent users, each generating a set of four PDFs ranging from 2 to 5 pages five times each, the servlet engine memory usage is about 110MB. 2. It uses quite a bit of CPU. While running the above test, the CPU is about 50% with 10 users, 70% with 20 users, and over 80% with 30 users. 3. It takes quite a bit of time to do the generation. The minimum generation time for the four documents are from 1 to 4 seconds (the 4 seconds one is 5 pages with 13 tables with various cell colors and border styles). In the 30 user test, the average time are from 20 to 40 seconds, and maximum well over 2 minutes. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP in a servlet under load
On 19 Jul 2001 11:24:01 +1000, Mark Lillywhite wrote: I just run 30 threads of my earlier chapter 15 allelements example on my home machine and noticed that compared to a single thread run, time spent on XSLT increased roughly 6 fold, time spent on build FO tree increased 30 fold, formating 12 fold. Context switches are at 6 per second level while in FOP, compared to 4000 per second while in Xalan. In unmodified FOP, input from the source FO document occurs entirely at the beginning of the FOP run, and output entirely at the end. Therefore, the largest part of FOP processing occurs entirely in-memory and is therefore CPU bound. If you run 30 CPU bound threads concurrently on a machine with less than 30 CPUs then you are going to get degraded performance. That's exactly what we observed. Unfortunately, in the servlet world, multi-threading is the norm. Not so much to distribute the load as to handle concurrent requests. I simply cannot queue up all the requests and process then one at a time. The question then becomes, is there room for improvements. From what I've heard so far, the answer is yes. Replacing inefficient JDK 1.1 always synchronized data structures, streamline the processing model, find ways to reduce object creation and garbage collection, seems to be the key. When you say 6, 30 and 12 fold, I assume you mean times? Yes. But I have to prefix that with 'uncontrolled unscientific unofficial pseudo-benchmark on a home machine'. Don't read too much into it. AFAIK, processing time on a single CPU machine with a CPU bound thread running with 29 other concurrent CPU bound threads *should* take 30 times longer, because it's executing 30x the instructions. If the XSLT and the formatting are doing I/O then these parts of the system will benefit from threading because the JVM can make progress during IO waits. I'm actually surprised that the numbers aren't much higher, but perhaps you have SMP. Following suggestions from another post in the thread, we tried Saxon in place of Xalan, and achieved noticeable speedups. And yes, Saxon is picky! I'll share some numbers later. Anyway, I'm not sure if my analysis is entirely correct here but none of this seems particularly surprising to me, and doesn't indicate any problems with FOP processing per se. It raises a question about the suitability of using FOP in a servlet environment. We certainly learned what is and is not achievable with today's FOP. And we'll regulate its use in a way that won't flatline the servers. Of course there is a lot I don't know about FOP so maybe someone can explain this to me. In another post Mark wrote: With my changes to FOP I can process tens of thousands of pages of XML:FO in only a few Mb of heap. I have asked for testers but so far noone has responded... this sounds like an ideal environment in I'll volunteer to test. Email me at [EMAIL PROTECTED] -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
[Patch] Build Error in TableRow.java
There is a trivial error in TableRow.java where are call to PropertyManager.checkBreakBefore() is missing the area parameter. A patch is attached. -- Weiqi Gao [EMAIL PROTECTED] Index: TableRow.java === RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.46 diff -u -r1.46 TableRow.java --- TableRow.java 2001/07/11 21:27:36 1.46 +++ TableRow.java 2001/07/14 13:48:27 @@ -237,7 +237,7 @@ } this.marker = 0; - int breakStatus = propMgr.checkBreakBefore(); + int breakStatus = propMgr.checkBreakBefore(area); if (breakStatus != Status.OK) return new Status(breakStatus); } 2001-07-14 Weiqi Gao [EMAIL PROTECTED] * TableRow.java: Call to PropertyManager.checkBreakBefore() requires an Area parameter. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: [Patch] Build Error in TableRow.java
On 14 Jul 2001 18:42:31 -0300, Arved Sandstrom wrote: I am responsible for changing the checkBreakBefore() signature, so I'll apply the patch. Odd that it didn't show up as an error during my builds (Ant/javac dependency checking is a bit spotty). Thank you. Isn't open source wonderful? Talking about Ant, I have just noticed that if I issue the command build.sh javadocs javadocs in xml-fop, the second time Ant executes the javadocs task a NullPointerException is thrown. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: JAVA to C/C++
Chris Leak wrote: I'm interested in converting FOP to C/C++. Has anyone else looked into this? A free software / open source C (or C++) implementation of the XSL Candidate Recommendation would certainly be a welcome addition. Any suggestions would be much appreciate. The only suggestion I would make is to make it a 'component' (COM/ActiveX, CORBA, GNOME, KDE, XPCOM, .NET, or whatever), just so that it can be used programmatically by many languages, VB, Delphi, Python, Perl, Ruby, JavaScript, etc. = Weiqi Gao [EMAIL PROTECTED] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: page-sequence is missing an sequence-specification Still inwont help
On 19 Jun 2001 23:04:21 -0600, peti ban wrote: I have used both the help of John and Weiqi, but it gives me the same error of page-sequence is missing an sequence-specification as I stated in my first mail. Peti, I saved the .fo file you posted at the beginning of this thread, and run it through Fop. And here's all the errors I encountered: ==Session==Session==Session== [weiqi@gao-2001 weiqi]$ fop -fo .fo -pdf .pdf FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree WARNING: A 'flow-name' is required for fo:flow. This constraint will be enforced in future versions of FOP WARNING: Unknown formatting object ^apply-templates setting up fonts formatting FOs into areas [1WARNING: page-number outside block area ] rendering areas to PDF writing out PDF [weiqi@gao-2001 weiqi]$ vi .fo [weiqi@gao-2001 weiqi]$ fop -fo .fo -pdf .pdf FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree WARNING: Unknown formatting object ^apply-templates setting up fonts formatting FOs into areas [1WARNING: page-number outside block area ] rendering areas to PDF writing out PDF [weiqi@gao-2001 weiqi]$ vi .fo [weiqi@gao-2001 weiqi]$ fop -fo .fo -pdf .pdf FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts formatting FOs into areas [1WARNING: page-number outside block area ] rendering areas to PDF writing out PDF [weiqi@gao-2001 weiqi]$ vi .fo [weiqi@gao-2001 weiqi]$ fop -fo .fo -pdf .pdf FOP 0.19.0-CVS using SAX parser org.apache.xerces.parsers.SAXParser building formatting object tree setting up fonts formatting FOs into areas [1] rendering areas to PDF writing out PDF [weiqi@gao-2001 weiqi]$ xpdf .pdf ==Session==Session==Session== I suspect that the error stems from the book template of your xslt, which you did not post. Could you run just the XSLT transformation on the XML file and post the pure .fo file? You do this by adding $FOP_HOME/lib/xalan-2.0.0.jar into your CLASSPATH, and run java org.apache.xalan.xslt.Process -in foo.xml -xsl bar.xsl -out foo.fo. -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Border problems
Hi, The latest CVS fixed a problem I reported against 0.18.1-DEV a few days ago (presence of certain tables makes a page shorter). However there still seems to be a problem with the following .fo file (the top and left border are outside the body-region): ?xml version=1.0 encoding=UTF-8? fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format; fo:layout-master-set fo:simple-page-master master-name=foo margin-top=1in margin-bottom=1in margin-left=1in margin-right=1in fo:region-body / /fo:simple-page-master /fo:layout-master-set fo:page-sequence master-name=foo fo:flow flow-name=xsl-region-body fo:table fo:table-column column-width=3in/ fo:table-body fo:table-row fo:table-cell border-style=solid border-width=0.5in fo:blockThis is a table cell example/fo:block /fo:table-cell /fo:table-row /fo:table-body /fo:table /fo:flow /fo:page-sequence /fo:root -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: XML Europe 2001 Proceedings
On 31 May 2001 07:57:54 -0300, Arved Sandstrom wrote: P.S. How is it that lots of people think IE is the better browser? :-) What was that reason again? Remind me It supports XSLT? -- Weiqi Gao [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]