You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Florian Deissenboeck <fl...@deissenboeck.de> on 2002/10/12 20:04:26 UTC

XSLT Caching

Hi,

in a web application we're working with 10 different stylesheets which
itself aren't too complex, but all these stylesheet include (xsl:inlude) the
same set of 6 other stylesheets. Now we set up a simple stylesheet cache
using XSLTC via the Templates interface. About 80% of our stylesheet cache
is redundant, since 80% of every stylesheet consists of these 6 included
XSLTs. We're afraid of runnig into memory problems, therefore we're looking
for a solution to cache the code all stylesheets share only once. Any idea
how this could be realized?

Thanks,

Flo


Re: XSLT Caching

Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
Florian,

 I'm afraid what you have in mind is not possible. Each translet must be
self contained. However, you're actually sharing a lot more than 20% of the
code when you include XSLTC's runtime system in this calculation.

 Depending on the translet, there may be even more code executed from the
runtime system (e.g. output system, DOM implementation, iterators, basis
library) than from the translet itself, and all this code will be shared. In
any case, IMO 10 stylesheets is probably not enough for you to worry about
memory problems.

-- Santiago

----- Original Message -----
From: "Florian Deissenboeck" <fl...@deissenboeck.de>
To: <xa...@xml.apache.org>
Sent: Saturday, October 12, 2002 2:04 PM
Subject: XSLT Caching


> Hi,
>
> in a web application we're working with 10 different stylesheets which
> itself aren't too complex, but all these stylesheet include (xsl:inlude)
the
> same set of 6 other stylesheets. Now we set up a simple stylesheet cache
> using XSLTC via the Templates interface. About 80% of our stylesheet cache
> is redundant, since 80% of every stylesheet consists of these 6 included
> XSLTs. We're afraid of runnig into memory problems, therefore we're
looking
> for a solution to cache the code all stylesheets share only once. Any idea
> how this could be realized?
>
> Thanks,
>
> Flo
>


Re: XSLT Caching

Posted by Joseph Kesselman <ke...@us.ibm.com>.
The simplest answer may be to invert the problem: Merge the stylesheets 
into a single stylesheet, using the "mode=" feature to select among the 
various cases.

______________________________________
Joe Kesselman  / IBM Research