Bug Tracker

Modify

Ticket #10432 (closed bug: patchwelcome)

Opened 21 months ago

Last modified 21 months ago

Webkit browser update slowed down massively using a.hide(); b.filter(':visible')

Reported by: gavin@… Owned by: dmethvin
Priority: undecided Milestone: None
Component: traversing Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

See  http://phrogz.net/tmp/webkit-jquery-browser-update-slowdown.html and follow the instructions there.

In summary, there are two jQuery objects with distinct sets of elements, 'classes' (100 <p> elements) and 'methods' (1500 <p> elements). If I write the code:

    classes.filter(':visible');
    methods.hide();

then everything is fine. However, if I change the order of those two statements, the web browser takes 40-500x longer to update the page after the JS is complete.

This bug reproduces on Chrome and Safari, but not Firefox. As such, I've also filed this as a Webkit bug:  https://bugs.webkit.org/show_bug.cgi?id=69464

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

Change History

comment:1 Changed 21 months ago by dmethvin

  • Owner set to dmethvin
  • Status changed from new to assigned

comment:2 Changed 21 months ago by dmethvin

  • Component changed from unfiled to traversing

I profiled it as well and the bottleneck doesn't appear to be inside a jQuery method. That points to an issue with Webkit, but of course this is a relatively pathological case given the number of elements being processed. If you find something we can change to fix the problem please let us know.

comment:3 Changed 21 months ago by dmethvin

  • Status changed from assigned to closed
  • Resolution set to patchwelcome

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.