[ http://nagoya.apache.org/jira/browse/XALANJ-1229?page=history ]
Henry Zongaro updated XALANJ-1229:
----------------------------------
Assign To: (was: Xalan Developers Mailing List)
type: Improvement (was: Bug)
Description:
When trying out xalan 2.4 I see a large performance problem with
my application.
My application :
I use domify (http://domify.sourceforge.net/) to build a DOM tree from
a JavaBean hierarchy. The DOM tree is build 'lazy'. That is : Only when
the elements are needed they are created.
The hierary is as follows:
RegistrationRoot
+--RegistrationYear
+---RegistrationProductionLine
+---RegistrationYear
+---RegistrationMonth
+---RegistrationBatch
- RegistrationRoot has a number of RegistrationYear(s).
- RegistrationYear has a number of RegistrationProductionLine(s)
- etc.
- RegistrationYear has an element "Year".
My XSLT:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="RegistrationRoot"/>
</xsl:template>
<xsl:template match="RegistrationRoot">
</xsl:template>
</xsl:stylesheet>
(I know this stylesheet does nothing, but it's good for showing the problem)
My problem:
In myXSLT you see that I only apply a template to RegistrationRoot.
So in my opinion it is not necessary to visit the children of the
RegistrationRoot element.
It seems that during the transformation xalan 2.4 visits each and every element
of
the DOM-tree. This behaviour is not found in xalan 2.0 ! (The perfomance
degradation
i'm experiencing is that now all my 'lazy' elements are instantiated !)
I printed out a stacktrace when the element "RegistrationMonth" is visited.
Its shows that the xalan-program is walking the tree (and not domify). So this
is to
show that domify is not the problem. I think xalan is.
java.lang.Throwable
at
gti.batch.registration.RegistrationMonth.getBatches(RegistrationMonth.java:74)
at java.lang.reflect.Method.invoke(Native Method)
at
org.infohazard.domify.ElementAdapter$MethodNodeListAdapter.item(ElementAdapter.java:89)
at
org.infohazard.domify.NodeAdapter.getNextSibling(NodeAdapter.java:151)
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:421)
at
org.apache.xml.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:560)
at
org.apache.xml.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1057)
at
org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:472)
at
org.apache.xpath.axes.ChildTestIterator.getNextNode(ChildTestIterator.java:124)
at
org.apache.xpath.axes.BasicTestIterator.nextNode(BasicTestIterator.java:150)
at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:320)
at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:311)
at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2331)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2152)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1205)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:660)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1121)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1099)
at Test2.execute(Test2.java:54)
at Test2.main(Test2.java:161)
So basically my problem is :
- When transforming a document xalan visits each and every node of the DOM-tree,
even
when my XPath-query only operates on the first children of the root-element.
Kees Kuip.
was:
When trying out xalan 2.4 I see a large performance problem with
my application.
My application :
I use domify (http://domify.sourceforge.net/) to build a DOM tree from
a JavaBean hierarchy. The DOM tree is build 'lazy'. That is : Only when
the elements are needed they are created.
The hierary is as follows:
RegistrationRoot
+--RegistrationYear
+---RegistrationProductionLine
+---RegistrationYear
+---RegistrationMonth
+---RegistrationBatch
- RegistrationRoot has a number of RegistrationYear(s).
- RegistrationYear has a number of RegistrationProductionLine(s)
- etc.
- RegistrationYear has an element "Year".
My XSLT:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="RegistrationRoot"/>
</xsl:template>
<xsl:template match="RegistrationRoot">
</xsl:template>
</xsl:stylesheet>
(I know this stylesheet does nothing, but it's good for showing the problem)
My problem:
In myXSLT you see that I only apply a template to RegistrationRoot.
So in my opinion it is not necessary to visit the children of the
RegistrationRoot element.
It seems that during the transformation xalan 2.4 visits each and every element
of
the DOM-tree. This behaviour is not found in xalan 2.0 ! (The perfomance
degradation
i'm experiencing is that now all my 'lazy' elements are instantiated !)
I printed out a stacktrace when the element "RegistrationMonth" is visited.
Its shows that the xalan-program is walking the tree (and not domify). So this
is to
show that domify is not the problem. I think xalan is.
java.lang.Throwable
at
gti.batch.registration.RegistrationMonth.getBatches(RegistrationMonth.java:74)
at java.lang.reflect.Method.invoke(Native Method)
at
org.infohazard.domify.ElementAdapter$MethodNodeListAdapter.item(ElementAdapter.java:89)
at
org.infohazard.domify.NodeAdapter.getNextSibling(NodeAdapter.java:151)
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:421)
at
org.apache.xml.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:560)
at
org.apache.xml.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1057)
at
org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:472)
at
org.apache.xpath.axes.ChildTestIterator.getNextNode(ChildTestIterator.java:124)
at
org.apache.xpath.axes.BasicTestIterator.nextNode(BasicTestIterator.java:150)
at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:320)
at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:311)
at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2331)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2152)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1205)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:660)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1121)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1099)
at Test2.execute(Test2.java:54)
at Test2.main(Test2.java:161)
So basically my problem is :
- When transforming a document xalan visits each and every node of the DOM-tree,
even
when my XPath-query only operates on the first children of the root-element.
Kees Kuip.
Environment:
Operating System: Other
Platform: All
was:
Operating System: Other
Platform: All
Priority: Major
Bugzilla Id: (was: 13579)
> Performance problem with Xalan 2.0 -> 2.4
> -----------------------------------------
>
> Key: XALANJ-1229
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1229
> Project: XalanJ2
> Type: Improvement
> Components: Xalan-interpretive, transformation
> Versions: 2.4
> Environment: Operating System: Other
> Platform: All
> Reporter: Kees Kuip
> Attachments: events_xalan20.log, events_xalan24.log
>
> When trying out xalan 2.4 I see a large performance problem with
> my application.
> My application :
> I use domify (http://domify.sourceforge.net/) to build a DOM tree from
> a JavaBean hierarchy. The DOM tree is build 'lazy'. That is : Only when
> the elements are needed they are created.
> The hierary is as follows:
> RegistrationRoot
> +--RegistrationYear
> +---RegistrationProductionLine
> +---RegistrationYear
> +---RegistrationMonth
> +---RegistrationBatch
> - RegistrationRoot has a number of RegistrationYear(s).
> - RegistrationYear has a number of RegistrationProductionLine(s)
> - etc.
> - RegistrationYear has an element "Year".
> My XSLT:
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="html"/>
> <xsl:template match="/">
> <xsl:apply-templates select="RegistrationRoot"/>
> </xsl:template>
> <xsl:template match="RegistrationRoot">
> </xsl:template>
> </xsl:stylesheet>
> (I know this stylesheet does nothing, but it's good for showing the problem)
> My problem:
> In myXSLT you see that I only apply a template to RegistrationRoot.
> So in my opinion it is not necessary to visit the children of the
> RegistrationRoot element.
> It seems that during the transformation xalan 2.4 visits each and every
> element of
> the DOM-tree. This behaviour is not found in xalan 2.0 ! (The perfomance
> degradation
> i'm experiencing is that now all my 'lazy' elements are instantiated !)
> I printed out a stacktrace when the element "RegistrationMonth" is visited.
> Its shows that the xalan-program is walking the tree (and not domify). So
> this is to
> show that domify is not the problem. I think xalan is.
> java.lang.Throwable
> at
> gti.batch.registration.RegistrationMonth.getBatches(RegistrationMonth.java:74)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> org.infohazard.domify.ElementAdapter$MethodNodeListAdapter.item(ElementAdapter.java:89)
> at
> org.infohazard.domify.NodeAdapter.getNextSibling(NodeAdapter.java:151)
> at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:421)
> at
> org.apache.xml.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:560)
> at
> org.apache.xml.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1057)
> at
> org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:472)
> at
> org.apache.xpath.axes.ChildTestIterator.getNextNode(ChildTestIterator.java:124)
> at
> org.apache.xpath.axes.BasicTestIterator.nextNode(BasicTestIterator.java:150)
> at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:320)
> at
> org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:311)
> at
> org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
> at
> org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2331)
> at
> org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2152)
> at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1205)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:660)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1121)
> at
> org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1099)
> at Test2.execute(Test2.java:54)
> at Test2.main(Test2.java:161)
> So basically my problem is :
> - When transforming a document xalan visits each and every node of the
> DOM-tree,
> even
> when my XPath-query only operates on the first children of the
> root-element.
> Kees Kuip.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]