[Webkit-unassigned] [Bug 8177] Javascript search incredibly slow
bugzilla-daemon at opendarwin.org
bugzilla-daemon at opendarwin.org
Thu Jun 15 13:32:29 PDT 2006
http://bugzilla.opendarwin.org/show_bug.cgi?id=8177
ap at nypop.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|JavaScriptCore |HTML DOM
------- Comment #4 from ap at nypop.com 2006-06-15 13:32 PDT -------
As a workaround, you can take most DOM accesses out of the loop - this makes
the code run really fast. In my example, this suggestion corresponds to:
function selectd() {
user = document.fmain.user;
domain = document.fmain.domain;
useroptions = document.fmain.user.options;
domainoptions = document.fmain.domain.options;
for (var i=0; i < useroptions.length; i++) {
if (domainoptions[i].value == useroptions[user.selectedIndex].value)
{
domain.selectedIndex=i;
}
}
}
Speaking about a possible fix in WebCore, looks like the lengths of
HTMLCollections need to be cached better.
--
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list