(trunk web) a simple tweak to setInnerHTML() clears out about 20% of the periodic refresh overhead on my setup...

This commit is contained in:
Charles Kerr
2009-05-23 21:14:03 +00:00
parent 529000a6e2
commit 998c6e6e8e
2 changed files with 13 additions and 9 deletions

View File

@@ -87,8 +87,14 @@ Array.prototype.clone = function () {
*/
function setInnerHTML( e, html )
{
if( e.innerHTML != html )
/* innerHTML is listed as a string, but the browser seems to change it.
* For example, "∞" gets changed to "∞" somewhere down the line.
* So, let's use an arbitrary different field to test our state... */
if( e.currentHTML != html )
{
e.currentHTML = html;
e.innerHTML = html;
}
};
/*