Draw control and page description updates
On 12/12/2007, Alistair Braidwood <alistair_braidwood at yahoo.co.uk> wrote:
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.
Not saying that it's not a good idea (I'd view it akin to locking for threads, just less generally useful), but what on earth does that have to do with ECMAScript? ECMAScript doesn't deal with documents, browsers, laying them out visually or drawing them. The browser is just one of numerous possible host environments. The specifications that deal with the browser host in particular are the DOM ones. The W3C WebAPI group seems to have control over most of DOM specs (SVG DOM, HTML DOM and similar aside), that's probably a better place to ask for this.
Fair enough, sorry to have troubled you. Steve Souders at Yahoo suggested I asked here, so I did.
Thanks for pointing me in the right direction, Alistair
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:
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. mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ