[wp-trac] [WordPress Trac] #17019: context arg for WP_Query filter application
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 8 05:24:24 UTC 2011
#17019: context arg for WP_Query filter application
-------------------------+------------------------------
Reporter: kevinB | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by scribu):
> Yes, I can use the context arg to return the value unfiltered, but isn't
that needless overhead which will be noted as plugin performance drag but
could be avoided via more strategic filter application?
You're merely replacing the overhead caused by extra function calls with
overhead caused by extra ifs checks.
Given that add_filter() and apply_filters() are called so many times
throughout a request, I'd be very surprized if this "strategic
application" would yield any speed improvements.
Anyway, first rule of optimization: show me the tests.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17019#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list