[wp-trac] Re: [WordPress Trac] #8957: 100% CPU, unresponsive javascript when leaving admin "Edit Posts" and "Edit Post" pages

WordPress Trac wp-trac at lists.automattic.com
Sun Jan 25 19:53:53 GMT 2009


#8957: 100% CPU, unresponsive javascript when leaving admin "Edit Posts" and "Edit
Post" pages
-------------------------------+--------------------------------------------
 Reporter:  _timk              |        Owner:  azaozz
     Type:  defect (bug)       |       Status:  new   
 Priority:  normal             |    Milestone:  2.8   
Component:  JavaScript         |      Version:  2.7   
 Severity:  major              |   Resolution:        
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------
Comment (by _timk):

 I replaced WP's jQuery 1.2.6 with the unpacked, unminified version of
 1.2.6, then turned Firefox's script timeout down to a couple of seconds.
 In the call stack in the debugger, it looks like it is indeed right in the
 middle of a jQuery unloader on line 2414:

 // Prevent memory leaks in IE
 // And prevent errors on refresh with events like mouseover in other
 browsers
 // Window isn't included so as not to unbind existing unload events
 jQuery(window).bind("unload", function() {
   jQuery("*").add(document).unbind(); // ** debugger highlights this line
 **
 });

 So jQuery is running unbind() on every element in the DOM, which just
 doesn't scale for documents with large numbers of elements?  Why would it
 need to run unbind() on the entire DOM, anyhow?  Are there really jQuery
 events bound to every element, or is this just a safety catch-all?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8957#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list