[wp-trac] [WordPress Trac] #58277: Change the position of notoptions lookup in get_option

WordPress Trac noreply at wordpress.org
Tue May 9 19:59:47 UTC 2023


#58277: Change the position of notoptions lookup in get_option
--------------------------------+------------------------------
 Reporter:  spacedmonkey        |       Owner:  (none)
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  performance
--------------------------------+------------------------------

Comment (by azaozz):

 Replying to [comment:3 spacedmonkey]:
 > In a block theme, this saves 100s of calls to cache.

 Yep, this change makes sense imho. I'm a bit unsure on how to best test
 the result. Seems it would have to compare getting existing and non-
 existing options (that would trigger DB connections). Perhaps something
 like get an existing option 1000 times, and 5 different non-existing
 options 3 times each, etc.

 In any case reducing the number of cache lookups is a good thing, even if
 the speed improvements are minimal.

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


More information about the wp-trac mailing list