cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <dho...@csir.co.za>
Subject Re: Speeding up an xinclude transform?
Date Fri, 06 May 2005 13:09:39 GMT
Chris(?)

Thanks - I will give this a try (cannot be slower than what I have
now and looks pretty straightforward).  It had not occurred to me
because it seemed this would require 50+ calls to the same 
pipeline.. instead of just one pass through one... but I'll check.

Re the caching - surely its Cocoon's "job" to check the files
being used (if they are static, as in this case) and send through
the latest version... but I will run some tests and see what occurs.

Thanks
Derek

>>> cocoon@chrismaloney.com 2005/05/06 02:44:53 PM >>>
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: users-unsubscribe@cocoon.apache.org 
>For additional commands, e-mail: users-help@cocoon.apache.org 
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message