#8844 closed enhancement (fixed)
Faster wp_clone function
| Reported by: | sambauers | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Optimization | Version: | 2.7 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Um, isn't $can_static already set? I usually just use is_null().