[wp-trac] [WordPress Trac] #54447: Site Icons on My Sites in multisite network causing performance issue
WordPress Trac
noreply at wordpress.org
Tue Dec 14 18:15:42 UTC 2021
#54447: Site Icons on My Sites in multisite network causing performance issue
-------------------------+-------------------------------------
Reporter: wslyhbb | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Toolbar | Version: 5.8
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: multisite, performance
-------------------------+-------------------------------------
Changes (by sabernhardt):
* keywords: => needs-patch
* type: defect (bug) => enhancement
* component: Administration => Toolbar
* milestone: Awaiting Review => Future Release
Old description:
> WordPress 5.8 added displaying the site icon on the My Sites menu. When a
> site has an icon, it takes 0.05 seconds per get_site_icon_url, and there
> are three of them per site, for a total of 0.15 seconds per site. When a
> multisite has hundreds of sites and 100 hundred of them have site icons,
> this adds up and adds 15 seconds to the page load time.
>
> The change causing performance issues:
> https://core.trac.wordpress.org/changeset/50834
New description:
WordPress 5.8 added displaying the site icon on the My Sites menu. When a
site has an icon, it takes 0.05 seconds per get_site_icon_url, and there
are three of them per site, for a total of 0.15 seconds per site. When a
multisite has hundreds of sites and 100 hundred of them have site icons,
this adds up and adds 15 seconds to the page load time.
The change causing performance issues: r50834
--
Comment:
Hi and welcome to Trac!
Thanks for the report. An early proposal on #46657 used a filter, and it
still could have one to check whether the site icons should be included.
Perhaps the filter could be something like this:
{{{
if ( apply_filters( 'show_site_icons_in_toolbar', true ) &&
has_site_icon() ) {
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54447#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list