[wp-trac] [WordPress Trac] #57502: Add object cache to wp_get_global_settings()

WordPress Trac noreply at wordpress.org
Wed Jan 18 17:36:07 UTC 2023


#57502: Add object cache to wp_get_global_settings()
-------------------------+--------------------------------------
 Reporter:  oandregal    |      Owner:  hellofromTonya
     Type:  enhancement  |     Status:  assigned
 Priority:  normal       |  Milestone:  6.2
Component:  Editor       |    Version:
 Severity:  normal       |   Keywords:  has-patch has-unit-tests
  Focuses:  performance  |
-------------------------+--------------------------------------
 To improve performance of a request, this ticket proposes adding object
 cache to `wp_get_global_settings()`.

 Why?

 To improve the performance of a request by:

 - **40% for themes with `theme.json`** (from 876.05ms to 520.80ms, a total
 of -355.25ms)
 - **10% for themes without `theme.json`** (from 500.26ms to 450.66ms, a
 total of -49.60ms)

 With the backport, the time a theme with `theme.json` takes to process a
 request is almost the same (70ms slower) than a theme without
 `theme.json`. See [full
 dataset](https://docs.google.com/spreadsheets/d/1ulnIA7EDun3vlMrDEcIowT2MwskU1VfScwQ33Ezbows/edit#gid=0).

 The work has already been done in Gutenberg and is ready for backporting
 to Core:

 - [https://github.com/WordPress/gutenberg/pull/45971 Gutenberg PR 45971]
 - [https://github.com/WordPress/gutenberg/pull/45372 Gutenberg PR 45372]
 - [https://github.com/WordPress/gutenberg/pull/46150 Gutenberg PR 46150]

 The strategy is similar to what was done in #56975 / [55086].

 This work is part of a larger strategy. See
 https://github.com/WordPress/gutenberg/issues/45171 for a detailed
 description of initiatives and actionable tasks to work on.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57502>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list