[Webkit-unassigned] [Bug 23662] Browser hangs for a long time first time a link is clicked

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 31 03:54:02 PST 2009


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





------- Comment #4 from mrowe at apple.com  2009-01-31 03:54 PDT -------
I suspect that a trivial change to jQuery could be made to avoid tickling this
performance cliff.  If the "hide" method were change to use two separate loops
it would avoid modifying the style info between each query of the "display"
property and would therefore avoid the need to re-layout so many times. 
Something like the following:

for ( var i = 0, l = this.length; i < l; i++ ){
        var old = jQuery.data(this[i], "olddisplay");
        if ( !old && old !== "none" )
                jQuery.data(this[i], "olddisplay", jQuery.css(this[i],
"display"));
}
for ( var i = 0, l = this.length; i < l; i++ )
    this[i].style.display = "none";


-- 
Configure bugmail: https://bugs.webkit.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