Author: mrglavas
Date: Sat Sep 30 09:20:57 2006
New Revision: 451609

URL: http://svn.apache.org/viewvc?view=rev&rev=451609
Log:
JIRA Issue #1200:

http://issues.apache.org/jira/browse/XERCESJ-1200



Applying a performance improvement from Jacob Kjome. In getElementById(), 
before 

walking the tree searching for attributes named "id" first try looking up the 
element 

with the given ID from the "identifiers" map.

Modified:
    xerces/java/trunk/src/org/apache/html/dom/HTMLDocumentImpl.java

Modified: xerces/java/trunk/src/org/apache/html/dom/HTMLDocumentImpl.java
URL: 
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/html/dom/HTMLDocumentImpl.java?view=diff&rev=451609&r1=451608&r2=451609
==============================================================================
--- xerces/java/trunk/src/org/apache/html/dom/HTMLDocumentImpl.java (original)
+++ xerces/java/trunk/src/org/apache/html/dom/HTMLDocumentImpl.java Sat Sep 30 
09:20:57 2006
@@ -399,6 +399,10 @@
 
     public synchronized Element getElementById( String elementId )
     {
+        Element idElement = super.getElementById(elementId);
+        if (idElement != null) {
+            return idElement;
+        }
         return getElementById( elementId, this );
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to