cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [PROPOSAL] "CachingPoint" Caching algorithm
Date Mon, 17 Jun 2002 13:31:54 GMT
Michael Melhem wrote:

>Hi Sylvain,
>
>You will find my response to your comments below.
>
>On Mon, Jun 17, 2002 at 02:05:33PM +0200, Sylvain Wallez wrote:
>  
>
>>Michael Melhem wrote:
>>
>>    
>>
>>>Hi all,
>>>
>>>I have started work on new caching algoritm which is refered to as
>>>the "cachingPoint" alogrithm.
>>>      
>>>

<snip/>

>>That's a very interesting proposal, as it can speedup a lot 
>>multi-channel applications. However, you forgot to say how do you flag a 
>>sitemap component as being a cache point ?
>>Does it require a specific attribute (<map:generate src="foo.xml" 
>>cachepoint="true"/>) ?
>>Can it be related to view labels (<map:view name="foo" 
>>from-label="foolabel" cachepoint="true") ?
>>    
>>
>
>Actually, cachepoint points are determined automatically
>using the following algorithm:-
>
>In Pseudo code the basic idea is as follows:
>if current Node extends SimpleSelectorProcessingNode
>        and if context.getProcessingPipeline() != null
>                        context.getProcessingPipeline().informBranchPoint()
>
>In other words, as we build up the pipeline (via invoke()), 
>whenever we come across treeprocessor nodes which 
>extend SimpleSelectorProcessingNode, then that should indicate 
>to us that a CachingPoint should be flagged
>
>The cocoon-view case is treated separately. Here is an example from
>GenerateNode.java: 
>---------------------------------------------
>...
>if (this.views != null) {
>   //
>   //
>   // Inform the pipeline that we have a branch
>   // point
>   //
>   context.getProcessingPipeline().informBranchPoint();
>
>   String cocoonView = env.getView();
>   if (cocoonView != null) {
>...
>---------------------------------------------
>
>Note: informBranchPoint() simply does nothing if the selected 
>ProcessingPipeline does not support cachepoints
>  
>

That's a clever algorithm, but don't you fear it will create too many 
branch points (and so cache entries) that what is really required by the 
application ?

Sylvain

-- 
Sylvain Wallez
  Anyware Technologies                  Apache Cocoon
  http://www.anyware-tech.com           mailto:sylvain@apache.org




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


Mime
View raw message