#8844 closed enhancement (fixed)
Faster wp_clone function
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Optimization | Version: | 2.7 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
The current wp_clone() function calls version_compare() on every execution, which is slooow.
Attached patch stores the result of version_compare() as a static variable. The speedup for bbPress was about 5% on a large site, not profiled in WordPress yet, but result should be similar as wp_clone() is called in cache retrieval processes.
Attachments (2)
Change History (8)
comment:1
jacobsantos — 4 years ago
- Resolution set to fixed
- Status changed from new to closed
- Resolution fixed deleted
- Status changed from closed to reopened
Fix for syntax errors in PHP4 attached.
- Resolution set to fixed
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

Um, isn't $can_static already set? I usually just use is_null().