I'm trying to cache
portions of my results (RTFs) to improve the performance of the overall
transformation on subsequent calls.
I'm finding it is worse performance after the 1st
transformation. It takes a tenth of a second longer to run my
transformation after the 1st time.
Any idea to why it takes longer after the first pass?
Does it have to validate the NodeList?
I'm
doing:
<xsl:if
test="java:TestEXT.containsKey($KEY) !=
'true'">
<xsl:variable name="frag">
<xsl:call-template name="filter-row"/>
</xsl:variable>
<xsl:variable name="nothing" select="java:TestEXT.setList($KEY, $frag)"/>
</xsl:if>
<xsl:copy-of select="java:TestEXT.getList($KEY)/*"/>
<xsl:variable name="frag">
<xsl:call-template name="filter-row"/>
</xsl:variable>
<xsl:variable name="nothing" select="java:TestEXT.setList($KEY, $frag)"/>
</xsl:if>
<xsl:copy-of select="java:TestEXT.getList($KEY)/*"/>
--- TestEXT.java ----
public class
TestEXT
{
private static Hashtable hash = new Hashtable();
public static boolean containsKey(String key)
{
return hash.containsKey(key);
}
{
private static Hashtable hash = new Hashtable();
public static boolean containsKey(String key)
{
return hash.containsKey(key);
}
public static NodeList
getList(String key)
{
return (NodeList) hash.get(key);
}
{
return (NodeList) hash.get(key);
}
public static void
setList(String key, NodeList list)
{
hash.put(key, list);
}
}
{
hash.put(key, list);
}
}
--- End TestEXT.java ---
Thanks,
Joe Hall
