Is the XPath expression the same in every case ("//inml:ind/meta")?
If so, then it would be easy to switch to using CInclude, which is cached:<file name='101.xml'> <ci:include src='cocoon:/101.meta.xml'/> </file>
And then define a new pipeline to produce 101.meta.xml:
<map:match pattern='*.meta.xml'>
<map:generator src='{1}.xml'/>
<map:transform src='pull-out-ind-meta.xslt'/>
<map:serialize>
</map:match>I'm pretty new to Cocoon, actually, and I've been using this technique a lot,
for example, to generate my nav bar. I'm not altogether happy with it, though,
mainly because I can't figure out how to control the cache -- i.e. to make sure
that it gets invalidated whenever {1}.xml changes. But, it's pretty fast.
Derek Hohls wrote:
I am looking to find a way to speed up a key step in a pipeline:
The one in question has the following steps:
<map:match pattern="ind-list">
<map:parameter name="handler" value="myindhandler"/>
<map:generate src="inds" type="directory" include="*.xml"/> <map:transform src="stylesheets/ind/ind-xincludes.xsl" >
<map:parameter name="ind-dir" value="inds"/>
</map:transform>
<!-- *NOW SLOW* -->
<map:transform type="xinclude"/>
<map:serialize type="xml"/> </map:match>
The pipeline is fast up to the end of the first transform,
resulting in XML which contains a number of tags of the form:
<file name="101.xml"> <xi:include href="inds/101.xml#xmlns(inml=http://www.myschema.com)xpointer(//inml:ind/meta)"/> </file>
The number of tags varies by directory, but is typically about 50. The files themselves are small - about 50k - and the "meta" tags have only a few bytes of text.
However, this last step takes over a minute! on a fast server
(2Gb memory, 3Ghz processor)...
What can I do to ensure that this is speeded up significantly...? ie at least a factor of 10!
Thanks Derek
--------------------------------------------------------------------- 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]
