[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
Wed Aug 14 15:46:05 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 adamsilverstein):

 @Toru - Hi, thanks for opening the ticket. This looks like a duplicate of
 https://core.trac.wordpress.org/ticket/45366 where a similar change to the
 query (only getting ids) is suggested. I'm going to close that older
 ticket and we can continue working on this here.

 My concern with changing to only retrieving the IDs is some sort of
 breakage, not priming caches seems like a safer change. Also, since the
 underlying functions aren't going to call the database again to get the
 full revision data (or at least title, date) - I think these would already
 be cached, but if we only get ids here they will not be cached.

 Did you see an actual performance improvement when swiching to IDs only?

 > I came across an issue where opening a Page in editor causing Fatal
 error of Allowed memory size of 268435456 bytes exhausted.

 I am curious how you triggered this, do you have a plugin that calls
 `wp_list_post_revisions`? the only use I found in core is for a revisions
 list widget.

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


More information about the wp-trac mailing list