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

WordPress Trac noreply at wordpress.org
Thu Jan 26 23:18:53 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                               |  Resolution:
 Keywords:  has-patch has-unit-tests gutenberg-  |     Focuses:
  merge                                          |  performance
-------------------------------------------------+-------------------------

Comment (by flixos90):

 PR https://github.com/WordPress/wordpress-develop/pull/3789 is almost good
 to go, so I just gave this another quick performance benchmark based on
 the median of 20 requests:

 * `wp_get_global_settings()` is called 77 times per page load, which we
 may separately want to improve.
 * Before this change, the total `wp_get_global_settings()` execution time
 was 12.5ms (total WP time 149.8ms).
 * With this change, the total `wp_get_global_settings()` execution time is
 1.5ms (total WP time 137.8ms).

 This is a massive win, not only for this function, but even for the entire
 WordPress page load this change reduces execution time by about 8%. \o/

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


More information about the wp-trac mailing list