[wp-trac] [WordPress Trac] #58376: Improve performance of the `_wp_array_get` function
WordPress Trac
noreply at wordpress.org
Wed May 24 02:23:08 UTC 2023
#58376: Improve performance of the `_wp_array_get` function
-------------------------+-----------------------------
Reporter: aristath | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: high | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: performance
-------------------------+-----------------------------
Comment (by samiamnot):
Thank you @costdev . Fascinating. Can I assume that a legacy theme like
TwentyFifteen or TwentySeventeen would have only a fraction of the calls
to `_wp_array_get()`? @flixos90's numbers above seem to show classic
themes being quicker overall, and I wonder how much is impacted by
`_wp_array_get()` calls. Do we know what the second most frequently called
function is for both classic and block themes?
Replying to [comment:11 costdev]:
> Here are some results from a quick check loading the frontend - TT3
active, no plugins active.
>
> Total calls to `_wp_array_get()`: 23873
>
> Top 5:
> - 9849 calls - `WP_Theme_JSON::merge()`
> - 3559 calls - `WP_Theme_JSON::get_property_value()`
> - 3283 calls - `WP_Theme_JSON::get_default_slugs()`
> - 1340 calls - `WP_Theme_JSON::get_metadata_boolean()`
> - 1129 calls - `block_has_support()`
> - These top 5 account for 19160 calls, or ~80%.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58376#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list