You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <wa...@free.fr> on 2000/09/07 12:04:24 UTC
Xalan compiled stylesheets
Hi cocooners
I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
objects. Cocoon's XalanTransformer doesn't use this feature which could
speed up processing of frequently used stylesheets.
I'm not fluent with transformers and cache management, so can anybody
give me a hint on how to implement a CachingXalanTransformer that could
cache compiled stylesheets ?
Thanks
-Sylvain
Re: Xalan compiled stylesheets
Posted by Sylvain Wallez <wa...@free.fr>.
Sorry, I was asking that for Cocoon 1, not C2.
Anyway, thanks for the answer.
-Sylvain
Sebastien Sahuc a écrit :
>
> Sylvain Wallez :
>
> > Hi cocooners
>
> > I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
> > objects. Cocoon's XalanTransformer doesn't use this feature which could
> > speed up processing of frequently used stylesheets.
>
> Well XalanTransformer already use stylesheetRoot, however the instance is
> not cached to the store, explaining your quote.
>
> > I'm not fluent with transformers and cache management, so can anybody
> > give me a hint on how to implement a CachingXalanTransformer that could
> > cache compiled stylesheets ?
>
> If you look at XTtransformer (transaformation package) you'll see how the
> XTProcessor (equivalent of StyleSheetRoot for XT processor) is cached
> into the 'store' component, and how it is retrieved back for upcoming
> call. You'll notice espacially the cloning step which is mandatory.
> Indeed XTProcessor is Thread safe, but not reetrant, so the same instance
> of XTProcessor cannot be used by more than 1 thread.
>
> Concerning Xalan, I saw that Stephano started implemented the caching
> mechanism, but Giacomo catched an issue that would prevent the cache from
> working. Don't remember what was the problem though.
>
> All the best,
>
> Sebastien
>
> > Thanks
> > -Sylvain
Re: Xalan compiled stylesheets
Posted by Sebastien Sahuc <ss...@imediation.com>.
Sylvain Wallez :
> Hi cocooners
> I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
> objects. Cocoon's XalanTransformer doesn't use this feature which could
> speed up processing of frequently used stylesheets.
Well XalanTransformer already use stylesheetRoot, however the instance is
not cached to the store, explaining your quote.
> I'm not fluent with transformers and cache management, so can anybody
> give me a hint on how to implement a CachingXalanTransformer that could
> cache compiled stylesheets ?
If you look at XTtransformer (transaformation package) you'll see how the
XTProcessor (equivalent of StyleSheetRoot for XT processor) is cached
into the 'store' component, and how it is retrieved back for upcoming
call. You'll notice espacially the cloning step which is mandatory.
Indeed XTProcessor is Thread safe, but not reetrant, so the same instance
of XTProcessor cannot be used by more than 1 thread.
Concerning Xalan, I saw that Stephano started implemented the caching
mechanism, but Giacomo catched an issue that would prevent the cache from
working. Don't remember what was the problem though.
All the best,
Sebastien
> Thanks
> -Sylvain
Re: Xalan compiled stylesheets
Posted by Giacomo Pati <Gi...@pwr.ch>.
Donald Ball wrote:
>
> On Thu, 7 Sep 2000, Sylvain Wallez wrote:
>
> > Hi cocooners
> >
> > I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
> > objects. Cocoon's XalanTransformer doesn't use this feature which could
> > speed up processing of frequently used stylesheets.
> >
> > I'm not fluent with transformers and cache management, so can anybody
> > give me a hint on how to implement a CachingXalanTransformer that could
> > cache compiled stylesheets ?
There is no need to implement a separat XalanTransformer which does
caching. Look at the XTTransformer for a example. It uses the store
component (which is nor implemented correctly).
> no, but i'd love to see this functionality in the cocoon codebase.
Yes, me too! I thought of awaiting the next Avalon release because of
some interfaces and classes they've written (ThreadSafe, Recyclable,
Poolable, Pool, etc.). This will take into the store component which is
used by many other sitemap components (ie compiled stylesheets). At the
moment there is no usable store component because the Cocoon class (as
ComponentManager) always instantiates a new store :<. But having these
new Interfaces the C2 ComponentManager (its the class Cocoon) might be
able to decide if a requested component must be instatiated or not.
If there is any volunteer to integrate that I'll be very happy ;-)
Giacomo
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen Mailto:Giacomo.Pati@pwr.ch
Web: http://www.pwr.ch
Re: Xalan compiled stylesheets
Posted by Donald Ball <ba...@webslingerZ.com>.
On Thu, 7 Sep 2000, Sylvain Wallez wrote:
> Hi cocooners
>
> I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
> objects. Cocoon's XalanTransformer doesn't use this feature which could
> speed up processing of frequently used stylesheets.
>
> I'm not fluent with transformers and cache management, so can anybody
> give me a hint on how to implement a CachingXalanTransformer that could
> cache compiled stylesheets ?
no, but i'd love to see this functionality in the cocoon codebase.
- donald