#8844 closed enhancement (fixed)
Faster wp_clone function
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Optimization | Keywords: | |
Focuses: | 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)
Note: See
TracTickets for help on using
tickets.
Um, isn't $can_static already set? I usually just use is_null().