[wp-trac] [WordPress Trac] #23459: Huge number of excluded IDs in get_pages dramatically slows down the site
WordPress Trac
noreply at wordpress.org
Tue Feb 12 18:05:30 UTC 2013
#23459: Huge number of excluded IDs in get_pages dramatically slows down the site
-----------------------------+-------------------------
Reporter: mikelopez | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: trunk | Severity: normal
Keywords: |
-----------------------------+-------------------------
Hi,
Just noticed that my site slows down dramatically if a huge number of IDs
are passed for exclusion to get_pages.
Site slow down are tracked down to a foreach loop and a mysql query that
uses multiple AND ID <> xx instead of ID NOT IN () which is better for
performance.
Attached is a patch to fix improve this part of the code and also speeds
up the site.
Thanks for considering my first contribution.
Mike
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23459>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list