Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #44321, comment 5


Ignore:
Timestamp:
06/08/2018 09:45:35 PM (7 years ago)
Author:
birgire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44321, comment 5

    initial v1  
    9494
    9595So from this quick testing, for 100-200 revisions, it seems to reduce the number of queries from 2 to 1 and runs order of magnitude times faster.
     96
     97One could also try with some extra posts in the database, e.g.:
     98
     99{{{
     100self::factory()->post->create_many( 1000 );
     101
     102}}}
     103
     104I also skimmed through {{{wp_count_posts()}}}, but it didn't seem usable here. Just imagine if {{{WP_Query}}} would support a count attribute :-)