sshyran / genxdm

Automatically exported from code.google.com/p/genxdm
0 stars 0 forks source link

DOM bridge implementation of getChildElementsByName is inefficient #42

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The DomSupport implementation of getChildElementsByName() calls the DOM  
"Element.getElementsByTagName()", which returns a NodeList, and then puts that 
NodeList into an ArrayList.

(a) Could simply create an Iterable for this specific functionality, which just 
instantiates an object to traverse the DOM tree.

(b) Iterable could be a wrapper around the NodeList result, if that's faster.

In either case, the current implementation creates an unnecessary duplicate 
"ArrayList".

Note that when we implement this, we should document the actual performance 
gain, and make those tests reusable so that we can test other bridges.

Original issue reported on code.google.com by eric%tib...@gtempaccount.com on 21 Jan 2011 at 8:25

GoogleCodeExporter commented 8 years ago
Hmmm - fixed this with r113.  Problem went deeper than just performance, 
because the implementation returned all descendants, rather than just the 
children.

See issue 12

Didn't write test cases, because Amy says the infrastructure there is in flux.

Original comment by eric%tib...@gtempaccount.com on 25 Jan 2011 at 12:14

GoogleCodeExporter commented 8 years ago

Original comment by eric%tib...@gtempaccount.com on 29 Apr 2011 at 11:21