You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Fiol Bonnín <an...@gmail.com> on 2005/07/08 14:37:57 UTC
Sitemap Performance Optimization
Hello,
I would like to improve performance on my cocoon application. I had an idea,
but I'd like to confirm that it would be useful.
On my sitemap, I have many small matchers, like:
<map:match pattern="foo">
<map:generate type="file" src="cocoon:/bar"/>
<map:transform type="xslt" src="bar2foo.xsl"/>
<map:serialize type="xml" />
</map:match>
<map:match pattern="bar">
<map:generate type="file" src="cocoon:/xyz"/>
<map:transform type="xslt" src="xyz2bar.xsl"/>
<map:serialize type="xml" />
</map:match>
<map:match pattern="xyz">
<map:generate type="file" src="abc"/>
<map:transform type="xslt" src="abc2xyz.xsl"/>
<map:serialize type="xml" />
</map:match>
Would I get better performance with the following "foo" pipeline?
<map:match pattern="bar">
<map:generate type="file" src="abc"/>
<map:transform type="xslt" src="abc2xyz.xsl"/>
<map:transform type="xslt" src="xyz2bar.xsl"/>
<map:transform type="xslt" src="bar2foo.xsl"/>
<map:serialize type="xml" />
</map:match>
Of course, such a sitemap would be less maintainable and more difficult to
debug (unless I use views, which is a nice possibility), but performance IS
an issue at the moment.
If the former "foo" pipeline gets better performance, could one optimize
this somehow? How?
<map:match pattern="foobar">
<map:aggregate element="foobar">
<map:part src="cocoon:/foo" />
<map:part src="cocoon:/bar" />
</map:aggregate>
<map:serialize type="xml" />
</map:match>
Thank you very much.
--
Antonio
Re: Sitemap Performance Optimization
Posted by Antonio Fiol Bonnín <an...@gmail.com>.
2005/7/8, Vilya Harvey <vi...@gmail.com>:
>
> >> I'd expect the single matcher to perform significantly better [...]
> > There is NO serialization and reparsing when reading from a cocoon:/
> > URL! The serializer stage is ignored and SAX events are passed from
> > one pipeline to the other one.
>
> I stand corrected! Thanks Ugo, that's good to know.
>
Thank you Vilya and Ugo. You have saved me (and hopefully others) quite a
"nice" headache.
--
Antonio
Re: Sitemap Performance Optimization
Posted by Vilya Harvey <vi...@gmail.com>.
Ugo Cei wrote:
> Il giorno 08/lug/05, alle 15:17, Vilya Harvey ha scritto:
>
>> The best advice is to try it and see for yourself. That said, I'd
>> expect the single matcher to perform significantly better as it
>> doesn't have the overhead of serializing and re-parsing the
>> intermediate transformation results.
>
>
> There is NO serialization and reparsing when reading from a cocoon:/
> URL! The serializer stage is ignored and SAX events are passed from
> one pipeline to the other one.
>
> Ugo
I stand corrected! Thanks Ugo, that's good to know.
Vil.
--
http://www.vilyaharvey.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Sitemap Performance Optimization
Posted by Ugo Cei <u....@pronetics.it>.
Il giorno 08/lug/05, alle 15:17, Vilya Harvey ha scritto:
> The best advice is to try it and see for yourself. That said, I'd
> expect the single matcher to perform significantly better as it
> doesn't have the overhead of serializing and re-parsing the
> intermediate transformation results.
There is NO serialization and reparsing when reading from a cocoon:/
URL! The serializer stage is ignored and SAX events are passed from one
pipeline to the other one.
Ugo
--
Ugo Cei
Tech Blog: http://agylen.com/
Open Source Zone: http://oszone.org/
Wine & Food Blog: http://www.divinocibo.it/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Sitemap Performance Optimization
Posted by Vilya Harvey <vi...@gmail.com>.
The best advice is to try it and see for yourself. That said, I'd expect
the single matcher to perform significantly better as it doesn't have
the overhead of serializing and re-parsing the intermediate
transformation results.
Vil.
Antonio Fiol Bonnín wrote:
> Hello,
>
> I would like to improve performance on my cocoon application. I had an
> idea, but I'd like to confirm that it would be useful.
>
> On my sitemap, I have many small matchers, like:
>
> <map:match pattern="foo">
> <map:generate type="file" src="cocoon:/bar"/>
> <map:transform type="xslt" src="bar2foo.xsl"/>
> <map:serialize type="xml" />
> </map:match>
> <map:match pattern="bar">
> <map:generate type="file" src="cocoon:/xyz"/>
> <map:transform type="xslt" src="xyz2bar.xsl"/>
> <map:serialize type="xml" />
> </map:match>
> <map:match pattern="xyz">
> <map:generate type="file" src="abc"/>
> <map:transform type="xslt" src="abc2xyz.xsl"/>
> <map:serialize type="xml" />
> </map:match>
>
>
> Would I get better performance with the following "foo" pipeline?
> <map:match pattern="bar">
> <map:generate type="file" src="abc"/>
> <map:transform type="xslt" src="abc2xyz.xsl"/>
> <map:transform type="xslt" src="xyz2bar.xsl"/>
> <map:transform type="xslt" src="bar2foo.xsl"/>
> <map:serialize type="xml" />
> </map:match>
>
> Of course, such a sitemap would be less maintainable and more
> difficult to debug (unless I use views, which is a nice possibility),
> but performance IS an issue at the moment.
>
> If the former "foo" pipeline gets better performance, could one
> optimize this somehow? How?
> <map:match pattern="foobar">
> <map:aggregate element="foobar">
> <map:part src="cocoon:/foo" />
> <map:part src="cocoon:/bar" />
> </map:aggregate>
> <map:serialize type="xml" />
> </map:match>
>
>
> Thank you very much.
>
> --
> Antonio
--
http://www.vilyaharvey.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org