#10853 closed enhancement (fixed)
improve get_page_hierarchy
| Reported by: | hailin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Performance | Version: | 2.8.4 |
| Severity: | normal | Keywords: | needs-unit-tests |
| Cc: | Focuses: |
Description
current get_page_hierarchy has O(N*N) complexity.
It is super slow when N is a few thousands.
We should improve this to O(N) using techniques similar to #10852.
Attachments (1)
Change History (10)
#1
@
17 years ago
unit tested and verified.
The time improvement is about 500%, even with a small dataset.
#2
follow-up:
↓ 5
@
17 years ago
We should not allow O(N*N) complexity in any of WordPress functions :-)
O(N) is what makes Google fast!
#5
in reply to: ↑ 2
@
17 years ago
- Keywords needs-unit-tests added
- Resolution fixed
- Status closed → reopened
Replying to hailin:
We should not allow O(N*N) complexity in any of WordPress functions :-)
O(N) is what makes Google fast!
Cool. Could we get these test written up as a patch for WordPress tests so we have performance and functionality tests for this code available?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
patch