Hi,

I'm struggling with the performance of my web app partly due to the 
unpredictability of when the browser decides to draw after (or while) I update 
the page description.

Firefox seems to draw on function boundaries and eg when I access 
document.body.clientHeight, so if I do something like:
    myDiv.innerHTML = "abc"
    h = document.body.clientHeight
    myDiv.className = getClassName()

The performance is worse than if I do:

    h = document.body.clientHeight
    myDiv.className = getClassName()



    myDiv.innerHTML = "abc"

because the former draws twice and the latter only once (obviously this example 
is grossly simplified)


It doesn't seem very practical or sensible to require the developer to order 
code in a specific way to avoid these sorts of performance penalties and my 
prefered solution would be to add "I'm about to edit the page description, 
please suspend drawing
ops" and "I've finished editing the page description, now you
may draw" functionality to the language - which is why I've mailed this group.

Alistair





      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to