[wp-trac] [WordPress Trac] #55425: Customize: Fetch presence of published pages more optimally (refactor)
WordPress Trac
noreply at wordpress.org
Sat Mar 19 17:51:47 UTC 2022
#55425: Customize: Fetch presence of published pages more optimally (refactor)
-------------------------+-----------------------------
Reporter: nagpai | Owner: nagpai
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 5.9.2
Severity: normal | Keywords: needs-patch
Focuses: |
-------------------------+-----------------------------
The function [https://core.trac.wordpress.org/browser/branches/5.9/src/wp-
includes/class-wp-customize-manager.php#L5743 has_published_pages] on line
[https://core.trac.wordpress.org/browser/branches/5.9/src/wp-includes
/class-wp-customize-manager.php#L5753 5753] seems to fetch all the data of
pages, whereas what is needed is only whether published pages exist or
not.
While this may not matter much in sites that have fewer pages, on website
that has too many pages, it may create an out of memory error. I will test
and submit a patch to fetch only the count of published pages that will
help improve efficiency.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55425>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list