Re: xinclude performance issues,

2003-01-20 Thread Jeff Turner
On Thu, Jan 16, 2003 at 03:11:37PM -0800, icewind wrote:
 Let me describe what I am doing:
 
 I have a directory that contains .xml files. In my
 sitemap, I have a pipeline that starts with a
 DirectoryGenerator on this directory. I then have a
 transformation that takes the directorygenerator's
 output and puts some xi:include tags with xpointers to
 some tags in the xml files I am interested in. I then
 run the xinclude transformation and serialize to html.

You could try the XPathDirectoryGenerator in Cocoon CVS.  It lets you
specify nodes in each file to include in the directory listing.  For
instance, to generate a page listing Ant scripts and their
descriptions:

http://aft.sourceforge.net/examples/index.html

I used:

map:generate type=xpathdirectory
   src=content/xdocs/examples#/project/description/


--Jeff

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: xinclude performance issues,

2003-01-19 Thread Christoph Gaffga
Hi,

My original Source for the Aggregator is in the attachment.

In my sitemap I put the following under the generators-Section:

 map:generator name=page src=com.triplemind.asp.generator.PageGenerator
label=content pool-grow=20 pool-max=200
 pool-min=80/

Here is a version, where i removed all my stuff, to make it
easier to read:

package com.triplemind.asp.generator;

import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.parameters.ParameterException;
import org.apache.cocoon.Constants;
import org.apache.cocoon.ProcessingException;
import org.xml.sax.SAXException;
import java.util.Map;

public class PageGenerator extends AbstractAggregator {

  protected Parameters par = null;

  public void setup(SourceResolver resolver, Map objectModel, String src,
Parameters par)
  throws ProcessingException, SAXException, IOException {

this.par = par;

// Aggregieren
this.setRootElement(aggregated-directory, , );

// Seiten die Aggregiert werden sollen
// while(moreFiles) { // or something like that
  // this.addPart(file, element, namespace, stripRoot, prefix);

  this.addPart(cocoon:/filex.xml, file-element, , false, );
// }

super.setup(resolver, objectModel, src, par);
  }

  public void recycle() {
this.par = null;
super.recycle();
  }
}

hope, that will help you. Perhaps you can submit your DirectoryAggregator to
the cocoon project.

Christoph Gaffga
[EMAIL PROTECTED]


From: icewind [EMAIL PROTECTED]
Subject: Re: xinclude performance issues,
 Christoph,
 Thank you for responding to my question about
 performance issues with xinclude. I would like to see
 your aggregator code, as I will probably need to do
 something like that anyway so starting with something
 that works would be beneficial.
 Feel free to email it to my address (unless it is over
 2 MB), or point me to a URL where I could download it;
 whatever is more convient for you.
 Again, thank you.
 --- Christoph Gaffga [EMAIL PROTECTED] wrote:
  Hi,
  We had the same Problem, instead of aggregating all
  files from a directory
  we had to aggregate all files/components from a list
  in our DB.
  The only solution we found, that would make sence in
  terms of perfomance,
  was to write our own Aggregator. You could simply
  extend Cocoon Default
  Aggregator to do so.
  If you are interested in our code, I can send it to
  you, but, as I said, it
  doesn't aggregate a directory, but it's a good piece
  of code to start with.
  Christoph Gaffga
  [EMAIL PROTECTED]
  From: icewind [EMAIL PROTECTED]
  Subject: xinclude performance issues,
   Let me describe what I am doing:
   I have a directory that contains .xml files. In my
   sitemap, I have a pipeline that starts with a
   DirectoryGenerator on this directory. I then have a
   transformation that takes the directorygenerator's
   output and puts some xi:include tags with xpointers to
   some tags in the xml files I am interested in. I
   then run the xinclude transformation and serialize to html.
   This is exactly what is described in this email to
   the list (i was involved in that original email):
   http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102617106411067w=2
   There is a link to this email in the Cocoon XSLT FAQ
   question titled: What's wrong with use of the
   document() function in Cocoon?
   So, I'm using that method, and it works. The result is
   that I get an html page with the tags I pulled out
   with xinclude for each xml file. It works, but the
   performance is pretty terrible. I have approximately
   30 xml files in the said directory, and the size that
   most of the files is around 30K. (there are a couple
   that are around 200K) I am pulling out 4 tags with
   xinclude. I have Cocoon version 2.0.3 and its running
   with tomcat on a dual 1ghz processor server with 1gb
   ram and raid disks.
   The time for the pipeline to execute is just under 14
   seconds, which is too long. (i measured using a
   stopwatch from the time I requested the page until the
   time i could see it).
   So, I have the usual questions:
   1) If anyone else is using a similar setup, do you
   have similar issues?
   2) What can I do to improve performance?
   Thanks for any suggestions.



PageGenerator.java
Description: Binary data
-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


Re: xinclude performance issues,

2003-01-17 Thread Christoph Gaffga
Hi,

We had the same Problem, instead of aggregating all files from a directory
we had to aggregate all files/components from a list in our DB.
The only solution we found, that would make sence in terms of perfomance,
was to write our own Aggregator. You could simply extend Cocoon Default
Aggregator to do so.

If you are interested in our code, I can send it to you, but, as I said, it
doesn't aggregate a directory, but it's a good piece of code to start with.

Christoph Gaffga
[EMAIL PROTECTED]



- Original Message -
From: icewind [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 12:11 AM
Subject: xinclude performance issues,


 Let me describe what I am doing:

 I have a directory that contains .xml files. In my
 sitemap, I have a pipeline that starts with a
 DirectoryGenerator on this directory. I then have a
 transformation that takes the directorygenerator's
 output and puts some xi:include tags with xpointers to
 some tags in the xml files I am interested in. I then
 run the xinclude transformation and serialize to html.
 This is exactly what is described in this email to the
 list (i was involved in that original email):
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102617106411067w=2

 There is a link to this email in the Cocoon XSLT FAQ
 question titled: What's wrong with use of the
 document() function in Cocoon?

 So, I'm using that method, and it works. The result is
 that I get an html page with the tags I pulled out
 with xinclude for each xml file. It works, but the
 performance is pretty terrible. I have approximately
 30 xml files in the said directory, and the size that
 most of the files is around 30K. (there are a couple
 that are around 200K) I am pulling out 4 tags with
 xinclude. I have Cocoon version 2.0.3 and its running
 with tomcat on a dual 1ghz processor server with 1gb
 ram and raid disks.

 The time for the pipeline to execute is just under 14
 seconds, which is too long. (i measured using a
 stopwatch from the time I requested the page until the
 time i could see it).

 So, I have the usual questions:

 1) If anyone else is using a similar setup, do you
 have similar issues?

 2) What can I do to improve performance?

 Thanks for any suggestions.






 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: xinclude performance issues,

2003-01-17 Thread Artur Bialecki


The XIncludeTransformer parses the included file into DOM,
and then streams the included part back into SAX. In my case
I have 1000 pages including parts of 10 others so I hacked
the XIncludeTransformer to keep the DOMs of those 10 pages in
memory. This is not the best solution but it's fastee, 
you should probably look at aggregators instead
(I had to deal with legacy XSP from Cocoon 1.x).

Artur...

 -Original Message-
 From: icewind [mailto:[EMAIL PROTECTED]] 
 Sent: January 16, 2003 6:12 PM
 To: [EMAIL PROTECTED]
 Subject: xinclude performance issues, 
 
 
 Let me describe what I am doing:
 
 I have a directory that contains .xml files. In my
 sitemap, I have a pipeline that starts with a
 DirectoryGenerator on this directory. I then have a
 transformation that takes the directorygenerator's
 output and puts some xi:include tags with xpointers to
 some tags in the xml files I am interested in. I then
 run the xinclude transformation and serialize to html.
 This is exactly what is described in this email to the
 list (i was involved in that original email):
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102617106411067w=2
 
 There is a link to this email in the Cocoon XSLT FAQ
 question titled: What's wrong with use of the
 document() function in Cocoon?
 
 So, I'm using that method, and it works. The result is
 that I get an html page with the tags I pulled out
 with xinclude for each xml file. It works, but the
 performance is pretty terrible. I have approximately
 30 xml files in the said directory, and the size that
 most of the files is around 30K. (there are a couple
 that are around 200K) I am pulling out 4 tags with
 xinclude. I have Cocoon version 2.0.3 and its running
 with tomcat on a dual 1ghz processor server with 1gb
 ram and raid disks. 
 
 The time for the pipeline to execute is just under 14
 seconds, which is too long. (i measured using a
 stopwatch from the time I requested the page until the
 time i could see it).
 
 So, I have the usual questions:
 
 1) If anyone else is using a similar setup, do you
 have similar issues?
 
 2) What can I do to improve performance?
 
 Thanks for any suggestions.
 
 
 
 
  
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
 http://mailplus.yahoo.com
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




xinclude performance issues,

2003-01-16 Thread icewind
Let me describe what I am doing:

I have a directory that contains .xml files. In my
sitemap, I have a pipeline that starts with a
DirectoryGenerator on this directory. I then have a
transformation that takes the directorygenerator's
output and puts some xi:include tags with xpointers to
some tags in the xml files I am interested in. I then
run the xinclude transformation and serialize to html.
This is exactly what is described in this email to the
list (i was involved in that original email):
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102617106411067w=2

There is a link to this email in the Cocoon XSLT FAQ
question titled: What's wrong with use of the
document() function in Cocoon?

So, I'm using that method, and it works. The result is
that I get an html page with the tags I pulled out
with xinclude for each xml file. It works, but the
performance is pretty terrible. I have approximately
30 xml files in the said directory, and the size that
most of the files is around 30K. (there are a couple
that are around 200K) I am pulling out 4 tags with
xinclude. I have Cocoon version 2.0.3 and its running
with tomcat on a dual 1ghz processor server with 1gb
ram and raid disks. 

The time for the pipeline to execute is just under 14
seconds, which is too long. (i measured using a
stopwatch from the time I requested the page until the
time i could see it).

So, I have the usual questions:

1) If anyone else is using a similar setup, do you
have similar issues?

2) What can I do to improve performance?

Thanks for any suggestions.




 

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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