[wp-trac] [WordPress Trac] #59173: Improve optimizations of get_site_url by not using switch_to_blog

WordPress Trac noreply at wordpress.org
Wed Aug 23 23:02:02 UTC 2023


#59173: Improve optimizations of get_site_url by not using switch_to_blog
-------------------------------------+-------------------------------------
 Reporter:  PerS                     |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Networks and Sites       |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite, performance
-------------------------------------+-------------------------------------

Comment (by manfcarlo):

 I strongly recommend not to accept this patch. The reasons should be
 obvious. It replaces a query of one field in one table to a totally
 different field in a totally different table. The effects would be
 significant and wide-reaching, and to describe it as a "performance" tune-
 up is misleading.

 I'm no fan of `switch_to_blog` and like to see it avoided, but you can't
 do it by throwing the baby out with the bathwater.

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


More information about the wp-trac mailing list