[Webkit-unassigned] [Bug 62840] Optimize HTMLInputElement::updateCheckedRadioButtons

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 7 05:15:25 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62840





--- Comment #1 from zeng huiqing <huiqing.zeng at intel.com>  2011-07-07 05:15:26 PST ---
For page load performance test, we find that while load a page with checkbox be preselected(<input type="checkbox" checked="">), Firefox + IE9 all load much faster than Chromium.[Find that the similar issue has also been reported in http://code.google.com/p/chromium/issues/detail?id=71600]

Through analysis, find the root cause is that when parsing an input element be preselected, the function HTMLInputElement::finishParsingChildren will invoke updateCheckedRadioButtons() which will lead to traversing the whole document, it is inefficient.

And, in my opinion, we may do not need to call updateCheckedRadioButtons() for checkbox in fact, it was just need for 'radio' type. So, I think we may can use 'if Statement' to avoid the unnecessary call for checkbox to remove the traversal overhead.

Of cause, I think in the future we may need to improve the algorithm of updateCheckedRadioButtons(), like to add a structure to save all the input elements' name and type, then we don't have to traverse the whole document:).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list