> >### 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.

Interestingly. Do you have a bug at hand? And do you know if it
applies to JS setters as well (e.g. element.value=123)? If not, it's
worth to note that either if+setter or setAttribute should be
utilized.
Greetings
xeen
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to