[wp-trac] [WordPress Trac] #55463: Add a limit to _prime_*_cache functions

WordPress Trac noreply at wordpress.org
Wed Apr 13 01:27:16 UTC 2022


#55463: Add a limit to _prime_*_cache functions
---------------------------------------------+---------------------------
 Reporter:  spacedmonkey                     |       Owner:  spacedmonkey
     Type:  enhancement                      |      Status:  assigned
 Priority:  normal                           |   Milestone:  6.0
Component:  Cache API                        |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  good-first-bug has-patch commit  |     Focuses:  performance
---------------------------------------------+---------------------------

Comment (by peterwilsoncc):

 I'm not seeing any benefit here. (Sorry, I couldn't quite read the images
 you shared.)

 Running 10,000 queries of the new query vs the old query isn't showing any
 difference to the second or third decimal place.

 ||= Patched =||= Unpatched =||
 || 2.602267742157 || 2.5758287906647 ||
 || 2.6104681491852 || 2.6174831390381 ||
 || 3.0410692691803 || 3.05641913414 ||
 || 2.5572915077209 || 2.5297293663025 ||
 || 2.6810057163239 || 2.6585900783539 ||
 || 2.4571781158447 || 2.4542315006256 ||

 This is just using the changed `$wpdb->get_results()` call with the
 relative queries.

 The
 [https://gist.github.com/peterwilsoncc/df70e801e0ec2c8997607c0afd13b5cf
 test code I was using is available as a gist], ignore the reference to
 caching -- obviously this isn't an issue with direct database queries --
 it was in there for testing an earlier ticket.

 The database has 1100 test posts in it, I was getting the indexes 35-44
 for some, 1035-1044 for other test runs.

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


More information about the wp-trac mailing list