[Project_owners] Speeding Up Extensions/Performance

Neil neil at parkwaycc.co.uk
Mon Dec 24 13:13:44 PST 2007

xeen wrote:

>### Check if the UI really needs to be updated ###
>An easy trick is to check if an UI element is already updated and do nothing if so instead of updating it anyway. So,
>for example
>if(element.text!=newText) element.text=newText;
>is (apparently) faster than without the check.
While this used to be true, setAttribute now has an internal check for 
this, although there is unfortunately old code still out there that 
hasn't been updated to avoid the now useless getAttribute call.

More information about the Project_owners mailing list