Performance from Smel:
I use CookComputing.XmlRpcV2.dll, and very slow working
*function XmlNode[] SelectNodes(XmlNode node, string name)
*in file XmlRpcSerializer.cs
original code
XmlNode[] SelectNodes(XmlNode node, string name)
{
ArrayList list = new ArrayList();
XmlNodeList nodes = node.ChildNodes;
/*for (int i = 0; i < nodes.Count; i++)*/
{
if (*nodes[i]*.Name == name) //exponent if i want 1000 node i need
go in node 1, after node 2, ... node 1000
list.Add(nodes[i]);
}
return (XmlNode[])list.ToArray(typeof(XmlNode));
}
you can changed on this
XmlNode[] SelectNodes(XmlNode node, string name)
{
ArrayList list = new ArrayList();
XmlNodeList nodes = node.ChildNodes;
/*foreach(XmlNode selnode in nodes)*/
{
if (selnode.Name == name)
list.Add(selnode); }
return (XmlNode[])list.ToArray(typeof(XmlNode));
}
in my program changet SelectNodes wokr <1sec, in original >10.
Original issue reported on code.google.com by ChasC...@gmail.com on 1 Nov 2008 at 5:34
Original issue reported on code.google.com by
ChasC...@gmail.com
on 1 Nov 2008 at 5:34