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-users&m=102617106411067&w=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]>