You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2008/04/07 04:58:24 UTC

[jira] Resolved: (XERCESJ-1296) ElementNSImpl.getBaseURI has exponential execution time relative to the depth of the node in the document

     [ https://issues.apache.org/jira/browse/XERCESJ-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1296.
-------------------------------------------

    Resolution: Fixed

Ludger, good catch.  I figure this perf bug slipped through in part because of code duplication; fixed in one place and missed in another.  Rather than patch the implementation in ElementNSImpl I decided to delete getBaseURI() from the class and factor out a method for retrieving the xml:base attribute.  So now there's only one implementation of getBaseURI() for element nodes in Xerces.

> ElementNSImpl.getBaseURI has exponential execution time relative to the depth of the node in the document
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1296
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1296
>             Project: Xerces2-J
>          Issue Type: Improvement
>          Components: DOM (Level 3 Core)
>    Affects Versions: 2.9.1
>            Reporter: Ludger Bünger
>            Assignee: Michael Glavassevich
>            Priority: Minor
>         Attachments: ElementNSImplPatch.txt
>
>
> When using the Namespace-aware implementation, getBaseURI upon ElementNSImpl unnecessarily calls getBaseURI twice upon its parent node (once upon "parent" and once upon "ownerNode") resulting in an exponential execution time relative to the depth of the node (since the number of calls to their respective parent method doubles with each level of invocation).
> Elena Litani solved this already for ElementImpl, the same patch should be applied to ElementNSImpl too.
> Solution: Apply the same patch to ElementNSImpl Elena Litani already applied to ElementImpl in svn build 319554 (see http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/dom/ElementImpl.java?r1=319502&r2=319554)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org