[wp-trac] [WordPress Trac] #39716: Improve update_meta_cache's performance when called with one object ID
WordPress Trac
noreply at wordpress.org
Fri Jan 27 01:41:23 UTC 2017
#39716: Improve update_meta_cache's performance when called with one object ID
--------------------------------+------------------------------
Reporter: macprawn | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Options, Meta APIs | Version: trunk
Severity: normal | Resolution:
Keywords: close 2nd-opinion | Focuses: performance
--------------------------------+------------------------------
Changes (by dd32):
* keywords: => close 2nd-opinion
Comment:
Hi @macprawn and welcome to Trac!
This is quite possibly an optimisation that won't actually speed anything
up, @pento what's your thoughts?
The MySQL query optimizer (which runs on all queries regardless) will
optimize a `IN(1)` and `=1` query the same way AFAIK, branching in PHP to
perform a separate code branch here is unlikely to save any significant
CPU time in the scheme of performing a query but would certainly add code
and debugging complexity for future maintainers.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39716#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list