[wp-trac] [WordPress Trac] #37833: To optimize database queries on page load

WordPress Trac noreply at wordpress.org
Fri Aug 26 05:41:29 UTC 2016


#37833: To optimize database queries on page load
----------------------------+-----------------------------
 Reporter:  KaugKo          |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:  trunk
 Severity:  normal          |   Keywords:
  Focuses:  performance     |
----------------------------+-----------------------------
 I've been optimizing my site SQL Queries on Page Load with Black Box
 plugins and find out every plugin I used for website have to retrieve
 their options value on every page load. Sometime there are 3 to 5
 get_option() call for each plugins and you can imagine there are more than
 30 calls total.

 What I am thinking is if Wordpress core advice plugin developers to
 register their plugin option values with some sort of universal key or
 prefix example "plugin_abc_setting_1" like db prefix and automatically
 retrieve all the options value with that prefix and build the global
 object or array as $theme_options.

 If we can do the above way, we will save lots of sql transitions on each
 page load.

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


More information about the wp-trac mailing list