Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of WP_Theme_JSON::get_merged_data method #3441

Closed
wants to merge 1 commit into from
Closed

Improve performance of WP_Theme_JSON::get_merged_data method #3441

wants to merge 1 commit into from

Commits on Oct 14, 2022

  1. get_merged_data: start from an existing theme.json

    get_merged_data is now a hotpath that is called many times.
    By improving small things that are repeated multiple times
    we get more performance wins.
    
    Instead of starting with an empty WP_Theme_JSON and call the merge operation
    we start by using the existing WP_Theme_JSON from core.
    
    This reduces from 402 to 326 the number of calls of the low-level
    WP_Theme_JSON->merge method.
    oandregal committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    0c676f3 View commit details
    Browse the repository at this point in the history