J
jambalapamba
I am removing node from a document depending on the style property and this is taking 5 seconds for checking complete document is there any ideas how can i improve the perfomance. Here is my part of code
foreach (IHTMLElement tempElement in document.all)
{
if (tempElement.style.visibility == "hidden" )
{
IHTMLDOMNode node = tempElement as IHTMLDOMNode;
node.parentNode.removeChild(node);
}
}
the for loop is taking more than 5 seconds for a page with size 100kb
From http://www.developmentnow.com/g/36_0_0_0_0_0/dotnet-languages-csharp.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com
foreach (IHTMLElement tempElement in document.all)
{
if (tempElement.style.visibility == "hidden" )
{
IHTMLDOMNode node = tempElement as IHTMLDOMNode;
node.parentNode.removeChild(node);
}
}
the for loop is taking more than 5 seconds for a page with size 100kb
From http://www.developmentnow.com/g/36_0_0_0_0_0/dotnet-languages-csharp.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com