Re: [xslt] FYI on string interning of XSLT transform mode/modeURI



--- Daniel Veillard <veillard redhat com> wrote:

>   Okay I added interning of mode and modeURI in
> xsltApplyStylesheetInternal().
> I didn't found any other string in the transform context which may lead to
> similar problem. Finger crosssed ...

I'll give it a try.  

> 
>   the whole dictionnary thing has been an exercise in refining an existing
> API carving stuff underneath while trying very very hard to not break any
> application, risky business for sure :-\

Yeah, but it's worked pretty well in reducing the memory footprint in my
application which uses xslt extensions to retrieve data (potentially lots) from
various relational databases.  I will say that this takes significant knowledge
of libxslt's handling of rvt's when designing the xslt, basically breaking
things into many small templates so the rvt's get free'd more often.  

Which brings me to this question:  I've poked around trying to improve the
granularity of the RVT's lifetime with little success, but I think one area
that could work is RVT's created inside an <xsl:for-each> loop, i.e.

<xsl:for-each select="something">
 <xsl:variable name="var" select="wow:some-extension-creating-rvts"/>
</xsl:for-each>

The rvt created in the for each loop is place in the tmpRVT for the template,
even though they aren't accessible outside the for-each loop.  Usually I'll
have the for-each loop call a named template that retrieves and processes the
external data.  This is not as pretty but reduces the overhead.  

>   Well, that's XSLT, if I change it I will get another kind of bug report :-\

Understood, but I can still whine about it :)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]