[wp-trac] [WordPress Trac] #57789: Make theme.json related caches persistent
WordPress Trac
noreply at wordpress.org
Tue Sep 26 01:07:50 UTC 2023
#57789: Make theme.json related caches persistent
---------------------------------------+--------------------------
Reporter: flixos90 | Owner: joemcgill
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.5
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: gutenberg-merge has-patch | Focuses: performance
---------------------------------------+--------------------------
Changes (by joemcgill):
* milestone: 6.4 => 6.5
Comment:
@flixos90 I ran a round of server timing profiles on each of these PRs and
while I'm seeing some improvement with both, I don't know that it's large
enough of a change to push hard for at this stage, but would rather see
these updates tested via the Gutenberg plugin and applied to a future
version of WP. Particularly, since there are Theme JSON data origins that
we've not even covered yet. Here's the results from the data I ran today:
{{{
## Trunk
### Twenty Twenty-three
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 232.64 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 236.84 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 241.37 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 256.21 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 260.35 ║
╚═════════════════════╧════════════════════════╝
### Twenty Twenty-one
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 143.93 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 145.25 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 147.66 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 152.7 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 159.32 ║
╚═════════════════════╧════════════════════════╝
## PR 5024
### Twenty Twenty-three
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 229.26 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 230.65 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 233.19 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 246.22 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 262.33 ║
╚═════════════════════╧════════════════════════╝
### Twenty Twenty-one
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 142.86 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 143.73 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 144.72 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 147.78 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 156.58 ║
╚═════════════════════╧════════════════════════╝
## Trunk (w/ memcached)
### Twenty Twenty-three
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 209.38 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 210.3 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 212.58 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 221.22 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 234.26 ║
╚═════════════════════╧════════════════════════╝
### Twenty Twenty-one (with memcached)
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 127.66 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 128.61 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 129.73 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 131.87 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 138.06 ║
╚═════════════════════╧════════════════════════╝
## PR 5267 (w memcached)
### Twenty Twenty-three
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 206 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 207.04 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 209.3 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 213.44 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 225.13 ║
╚═════════════════════╧════════════════════════╝
### Twenty Twenty-one (with memcached)
╔═════════════════════╤════════════════════════╗
║ URL │ http://localhost:8889/ ║
╟─────────────────────┼────────────────────────╢
║ Success Rate │ 100% ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p10) │ 127.94 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p25) │ 129.12 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p50) │ 132.8 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p75) │ 139.86 ║
╟─────────────────────┼────────────────────────╢
║ Response Time (p90) │ 143.62 ║
╚═════════════════════╧════════════════════════╝
}}}
For each of these, I ran the server timing CLI script from
https://github.com/GoogleChromeLabs/wpp-research/tree/main/cli with 50
runs to get the results.
While there seems to be improvement from both PRs, the amount of
improvement is generally within the range of variance between the p25–p75
amounts, so it's hard to say definitively how much improvement should be
expected. I'm going to punt this to the 6.5 milestone for now while we
continue working on this via PRs against the Gutenberg repo.
I attempted to do another round of profiling for all of these use cases
today, but am seeing some unexpected results, so am planning to run them
again when I have a clearer brain.
Also, to clarify the question you asked above:
> he profile you linked to
(https://core.trac.wordpress.org/ticket/57789#comment:23) seems to be for
another PR.
The point I was trying to make is that if you look at the profile of
trunk, you can see the relative wall time for each of the methods that get
data for the specific origins. Even in my most recent profile runs, I'm
consistently seeing core and user (i.e. custom) data taking the most time
to generate. Those two seem like the best opportunities to improve via
caching strategies.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57789#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list