[wp-trac] [WordPress Trac] #43891: Performance improvement for WP_Query

WordPress Trac noreply at wordpress.org
Sat Apr 28 23:28:40 UTC 2018


#43891: Performance improvement for WP_Query
-------------------------------------------------+-------------------------
 Reporter:  rnaby                                |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Query                                |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing reporter-    |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * keywords:  has-patch needs-testing 2nd-opinion dev-feedback => has-patch
     needs-testing reporter-feedback
 * version:  trunk =>
 * severity:  major => normal


Comment:

 Thanks for the ticket and the patch, @rnaby, but I think your benchmarks
 are flawed. If you add `judge($a, 'reset');` to the end of the test (after
 `judge($a, '_reset');` you'll see that directly calling `reset()` is
 faster than the other methods. Your `_test()` function incurs overhead
 that the `reset()` function doesn't.

 Can you confirm?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43891#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list