[wp-trac] [WordPress Trac] #58673: WordPress database error when installing PHPUnit tests
WordPress Trac
noreply at wordpress.org
Wed Jul 12 11:46:09 UTC 2023
#58673: WordPress database error when installing PHPUnit tests
--------------------------+--------------------------
Reporter: Chouby | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 6.3
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: performance
--------------------------+--------------------------
Comment (by spacedmonkey):
@flixos90 @swissspidy @joemcgill
I have spent some time improving [https://github.com/WordPress/wordpress-
develop/pull/4831 #4831], it now ready for review. Details of the change
are detailed in the description.
This change, only defers the loading of theme.json data until it needed.
This fixes the PHPUnit issue in this ticket and means Duo tone only loads
if needed. Without a larger refactor ( out of scope of this stage of
release ), we can not get rid of this performance regression completely.
Calling `WP_Theme_JSON_Resolver::get_merged_data()` is expensive and there
is no getting around that for now.
In my testing, I compared the following. Block / classic theme, post with
and without a image block ( that support duo tone) and a REST API request
with no blocks.
These were run on 1000 runs, PHP 8.2, using test data.
||URL||Success Rate||Response Time (median)||wp-load-alloptions-query
(median)||wp-before-template (median)||wp-before-template-db-queries
(median)||branch||theme||
||/2023/01/13/media-category-
blocks/||100%||69.45||0.89||30.4||2.13||trunk||twentytwentyone||
||/2023/01/13/media-category-
blocks/||100%||85.33||0.77||38.31||2.89||trunk||twentytwentythree||
||/2023/01/13/media-category-blocks/||100%||59.37||0.76||21.63||1.77||fix
/fix-duo-tone||twentytwentyone||
||/2023/01/13/media-category-blocks/||100%||82.33||0.75||35.69||2.7||fix
/fix-duo-tone||twentytwentythree||
||/2023/07/10/hello-
world/||100%||64.94||0.91||31.25||2.11||trunk||twentytwentyone||
||/2023/07/10/hello-
world/||100%||97.63||0.9||46.66||3.46||trunk||twentytwentythree||
||/2023/07/10/hello-world/||100%||52.87||0.77||21.32||1.71||fix/fix-duo-
tone||twentytwentyone||
||/2023/07/10/hello-world/||100%||79.4||0.76||36.57||2.72||fix/fix-duo-
tone||twentytwentythree||
||/wp-
json/wp/v2/types||100%||40.19||N/A||N/A||N/A||trunk||twentytwentyone||
||/wp-
json/wp/v2/types||100%||41.33||N/A||N/A||N/A||trunk||twentytwentythree||
||/wp-json/wp/v2/types||100%||28.12||N/A||N/A||N/A||fix/fix-duo-
tone||twentytwentyone||
||/wp-json/wp/v2/types||100%||40.37||N/A||N/A||N/A||fix/fix-duo-
tone||twentytwentythree||
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58673#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list