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: |
|
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:
- 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.
- 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.
I really doubt this'll get fixed without a UI change.