[wp-trac] [WordPress Trac] #61849: Improve performance and memory usage of wp_list_post_revisions() / wp_get_post_revisions()

WordPress Trac noreply at wordpress.org
Sat Aug 10 02:53:58 UTC 2024


#61849: Improve performance and memory usage of wp_list_post_revisions() /
wp_get_post_revisions()
-------------------------+--------------------------
 Reporter:  Toru         |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  6.7
Component:  Revisions    |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  performance
-------------------------+--------------------------

Comment (by Toru):

 A further thought. Substituted `$revisions` doesn't need to be object with
 all the field values? I think it only needs to be array of post ids.  We
 can pass `'fields' => 'ids'` for `$args` at line 1994.

 Note, `wp_get_post_revisions()` is called multiple times here. Once in
 line 1994, and in the foreach loop called by `wp_is_post_autosave()`

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


More information about the wp-trac mailing list