Make WordPress Core

Opened 17 years ago

Closed 16 years ago

#9696 closed defect (bug) (fixed)

100% CPU usage, unresponsive script when entering Edit Post page with large # of categories

Reported by: _timk's profile _timk Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: Performance Keywords: needs-patch
Focuses: Cc:

Description

This is an offshoot of ticket #8957. That ticket applied to leaving the page, while this applies to entering the page.

I've got close to 2000 categories on one of my WordPress sites for sorting posts by things like city, state, and postal code. This large number of categories exposes at least one javascript performance problem. When entering the Edit Post page, the page initialization scripting runs the client CPU usage up to 100% and, on some computers, triggers Firefox's unresponsive script warning/timeout.

Steps to reproduce:

  1. Add around 2000 categories to WordPress. 99% of mine are two levels deep (each has one parent with one parent, only 4 "parent" categories exist in the system), but I don't think it matters since the hierarchy is not displayed on the Edit Post page where the problem occurs.
  1. Visit the Edit Post page for any post. As the page loads, the browser will halt for a few seconds (fast computer) or many seconds (slow computer) and may trigger script timeouts in the browser.

My WordPress install is v2.7.0 with the patch from #10444 to solve this same kind of issue on page unload. jQuery version is 1.3.1.

When I last dug into this with a jQuery profiler, execution was spending a lot of time near this comment:

// this is all really inefficient

So that might be something to look at.

Change History (5)

#1 @Denis-de-Bernardy
17 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to Future Release

I really doubt this'll get fixed without a UI change.

#2 @azaozz
17 years ago

(In [11201]) Don't bind every form element to form.submit in wp-lists, fixes #7838, see #9696

#3 @Denis-de-Bernardy
17 years ago

  • Component changed from UI to Performance
  • Milestone changed from Future Release to 2.9
  • Owner set to Denis-de-Bernardy

#4 @Denis-de-Bernardy
17 years ago

  • Owner Denis-de-Bernardy deleted
  • Status changed from new to assigned

#5 @ryan
16 years ago

  • Milestone changed from 2.9 to 2.8
  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.