cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <reinh...@apache.org>
Subject Re: [Cocoon 3] Optimizing resources creation on SAX pipeline components
Date Mon, 25 Jan 2010 07:20:37 GMT
Simone Tripodi wrote:
> Hi all guys,
> I'd like to improve a little the resources creation into C3 SAX
> pipelines components, saving consumed memory and components
> initialization time, reusing already created resources.
> I mean, instantiating the same kind of XSLTTransformer (or the
> SchemaProcessorTransformer) twice, in different parts of the
> application, with the same resource:
> 
> class Service1 {
> 
>     XSLTTransformer xsltTransformer =
> new XSLTTransformer(this.getClass().getResource("myStyle.xsl"));
>     ...
> }
> 
> class Service2 {
>     XSLTTransformer xsltTransformer =
> new XSLTTransformer(this.getClass().getResource("myStyle.xsl"));
>     ...
> }
> 
> causes the "myStyle.xsl" resource has to be load twice, consuming
> memory. As proposed time ago - also mentioned by Sylvain - I'd like to
> introduce an InMemoryLRU cache that stores and maintains already loaded
> resources.
> 
> What do you think about it? It's a simple improvement I can realize
> quickly and that's not hard to integrate in the existing code, obviously
> any kind of help and suggestion is more than welcome! :)

Yes, improvements in that area are very appreciated. What solution (api)
do you propose?

And when we are at it, it would also be great to support the
CachingPipelineComponent interface in the XSLTTransformer and the
SchemaProcessorTransformer.

-- 
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  reinhard@apache.org
________________________________________________________________________

Mime
View raw message